From d8b3958c8763e5b030367b8e3e570b08ff62662f Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 28 Oct 2022 17:36:17 -0400 Subject: [PATCH] upcomingEvents: Check for error on retrieving event list --- memberPlumbing/upcomingEvents.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/memberPlumbing/upcomingEvents.py b/memberPlumbing/upcomingEvents.py index 3c042e2..c4da789 100644 --- a/memberPlumbing/upcomingEvents.py +++ b/memberPlumbing/upcomingEvents.py @@ -36,6 +36,10 @@ def main(): membershipworks = config.membershipworks events = membershipworks.get_events_list(datetime.now()) + if "error" in events: + print("Error:", events["error"]) + return + events_list = "\n
\n\n".join( format_event(membershipworks, event) for event in events["evt"]