upcomingEvents: Check for error on retrieving event list
This commit is contained in:
parent
68b4b10c51
commit
d8b3958c87
@ -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