Skip to content

Commit

Permalink
Handle non existing executable for logging_sender.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamandar authored and OniriCorpe committed Apr 2, 2024
1 parent fe1b9e8 commit ffb3555
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/appslib/logging_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
Expand Down

0 comments on commit ffb3555

Please sign in to comment.