1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

Handle non existing executable for logging_sender.py

This commit is contained in:
Salamandar 2024-04-02 12:36:24 +02:00 committed by OniriCorpe
parent fe1b9e87c2
commit ffb3555d7f

View file

@ -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}.