upcomingEvents: Check for error on retrieving event list

This commit is contained in:
Adam Goldsmith 2022-10-28 17:36:17 -04:00
parent 68b4b10c51
commit d8b3958c87

View File

@ -36,6 +36,10 @@ def main():
membershipworks = config.membershipworks membershipworks = config.membershipworks
events = membershipworks.get_events_list(datetime.now()) events = membershipworks.get_events_list(datetime.now())
if "error" in events:
print("Error:", events["error"])
return
events_list = "\n<hr />\n\n".join( events_list = "\n<hr />\n\n".join(
format_event(membershipworks, event) format_event(membershipworks, event)
for event in events["evt"] for event in events["evt"]