upcomingEvents: Check for error on retrieving event list
This commit is contained in:
parent
2570aa3620
commit
f85c26a844
@ -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"]
|
||||||
|
Reference in New Issue
Block a user