Bugfix: event loop issues. Closes #8
This commit is contained in:
parent
f599911998
commit
e4a153d385
5
main.py
5
main.py
@ -29,7 +29,10 @@ def main():
|
|||||||
while True:
|
while True:
|
||||||
events = api.get_events()
|
events = api.get_events()
|
||||||
for event in 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)
|
log_event(event)
|
||||||
|
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
Loading…
Reference in New Issue
Block a user