Bugfix: event loop issues. Closes #8

This commit is contained in:
agatha 2023-11-11 15:30:17 -05:00
parent f599911998
commit e4a153d385

View File

@ -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)