From 7ea1f38a0fb002a0a7ae82b1f37e30b96ba3503b Mon Sep 17 00:00:00 2001 From: j Date: Fri, 19 Mar 2021 10:19:19 +0100 Subject: [PATCH] check body --- pandora/websocket/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/websocket/worker.py b/pandora/websocket/worker.py index 1a0e633d4..9a3d7bd4d 100644 --- a/pandora/websocket/worker.py +++ b/pandora/websocket/worker.py @@ -24,7 +24,7 @@ class Worker(ConsumerMixin): def process_task(self, body, message): try: - if body['task'] == 'trigger_event': + if isinstance(body, dict) and body.get('task') == 'trigger_event': daemon.trigger_event(*body['args']) except: logger.error('faild to trigger event %s', body, exc_info=True)