From 107d801e2c7f93047622225cc37b77935427af7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 2 Apr 2024 12:36:24 +0200 Subject: [PATCH] Handle non existing executable for logging_sender.py --- appslib/logging_sender.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appslib/logging_sender.py b/appslib/logging_sender.py index d65c257..bba28cc 100644 --- a/appslib/logging_sender.py +++ b/appslib/logging_sender.py @@ -34,6 +34,8 @@ def notify(message: str, channel: str, markdown: bool = False) -> None: try: subprocess.call(command, stdout=subprocess.DEVNULL) + except FileNotFoundError: + logging.warning("The logging sender tool /var/www/webhooks/matrix-commander does not exist.") except subprocess.CalledProcessError as e: logging.warning( f"""Could not send a notification on {channel}.