From 5cf4943f69c294cfaa1e9a7f9c858a2f09353751 Mon Sep 17 00:00:00 2001 From: Dave Gallant Date: Sat, 25 Feb 2023 10:38:05 -0500 Subject: [PATCH] Add warning when APPRISE_URL is not set. --- rfd_notify/notifications.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rfd_notify/notifications.py b/rfd_notify/notifications.py index ca1c4ed..c7fd3e1 100644 --- a/rfd_notify/notifications.py +++ b/rfd_notify/notifications.py @@ -11,6 +11,10 @@ from constants import API_BASE_URL def send_notification( topic: Topic, posts: List[Post], expression: str, servers: str ) -> None: + if servers is None: + logger.warning("APPRISE_URL is not set. Will not send notifcation") + return + apobj = apprise.Apprise() apobj.add(servers)