From fe565569a1235e45d360e87f79e542cf374eccf3 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Wed, 25 Nov 2020 16:12:57 -0800 Subject: [PATCH] Ignore heartbeat messages with empty control fields --- present/present.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/present/present.py b/present/present.py index 19fb18f..9fd8852 100755 --- a/present/present.py +++ b/present/present.py @@ -43,6 +43,8 @@ while True: for event in client.events(): parsed = json.loads(event.data) control = parsed['control'] + if control == '': + continue if control not in ALLOWED_CONTROLS: print(f'INVALID CONTROL: {control}') continue