From 2837d0df70dec211def3fa557aca25d436ce43f1 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 3 Nov 2017 12:01:20 +0100 Subject: [PATCH] Global DEVICE_ID --- notifier.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/notifier.py b/notifier.py index 259cbd0c1f..b533acff33 100644 --- a/notifier.py +++ b/notifier.py @@ -105,6 +105,8 @@ def _exec_func(body, retry=True): def _on_push(ws, data): + global DEVICE_ID + data = json.loads(data) if data['type'] == 'tickle' and data['subtype'] == 'push': logging.debug('Received push tickle') @@ -142,6 +144,8 @@ def on_push(ws, data): def main(): + global DEVICE_ID + DEBUG = False config_file = curdir + os.sep + 'config.yaml'