Handle non existing executable for logging_sender.py
This commit is contained in:
parent
06a0563685
commit
107d801e2c
1 changed files with 2 additions and 0 deletions
|
@ -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}.
|
||||||
|
|
Loading…
Reference in a new issue