From ffb3555d7f927da198f37eb0a0c4d281111f7710 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 --- tools/appslib/logging_sender.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/appslib/logging_sender.py b/tools/appslib/logging_sender.py index d65c2579..bba28cc8 100644 --- a/tools/appslib/logging_sender.py +++ b/tools/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}.