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)