Add warning when APPRISE_URL is not set.

This commit is contained in:
Dave Gallant
2023-02-25 10:38:05 -05:00
parent ad58db345e
commit 5cf4943f69

View File

@@ -11,6 +11,10 @@ from constants import API_BASE_URL
def send_notification( def send_notification(
topic: Topic, posts: List[Post], expression: str, servers: str topic: Topic, posts: List[Post], expression: str, servers: str
) -> None: ) -> None:
if servers is None:
logger.warning("APPRISE_URL is not set. Will not send notifcation")
return
apobj = apprise.Apprise() apobj = apprise.Apprise()
apobj.add(servers) apobj.add(servers)