From e4a153d3850a3baa224ead21311f29c8d51c08ee Mon Sep 17 00:00:00 2001 From: agatha Date: Sat, 11 Nov 2023 15:30:17 -0500 Subject: [PATCH] Bugfix: event loop issues. Closes #8 --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 00f2867..61a73f9 100644 --- a/main.py +++ b/main.py @@ -29,7 +29,10 @@ def main(): while True: events = api.get_events() for event in events: - if event['type'] in ['CreateEvent', 'DeleteEvent']: + if ( + isinstance(event, dict) + and event.get('type') in ['CreateEvent', 'DeleteEvent'] + ): log_event(event) time.sleep(5)