fixing error handling for json parsing

This commit is contained in:
Lucas Oskorep
2022-06-23 01:15:31 -04:00
parent 32df9bd9d3
commit befc5f9f81
3 changed files with 13 additions and 8 deletions
+3 -1
View File
@@ -46,7 +46,9 @@ class CalGrab(object):
print('No upcoming events found.')
return
events = [Event.get_from_gcal_api_json(json) for json in events]
events = [i for i in [Event.get_from_gcal_api_json(json) for json in events] if i is not None]
print(events)
for callback in self.callbacks:
callback(events)
if time_to_update > 0 and (now - start).total_seconds() > time_to_update: