1
0
Fork 0

Handle non existing executable for logging_sender.py

This commit is contained in:
Félix Piédallu 2024-04-02 12:36:24 +02:00 committed by OniriCorpe
parent 06a0563685
commit 107d801e2c

View file

@ -34,6 +34,8 @@ def notify(message: str, channel: str, markdown: bool = False) -> None:
try: try:
subprocess.call(command, stdout=subprocess.DEVNULL) 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: except subprocess.CalledProcessError as e:
logging.warning( logging.warning(
f"""Could not send a notification on {channel}. f"""Could not send a notification on {channel}.