From 5b6dc562c97127a4dad7da29e6f69a58c542c4ee Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Fri, 15 Mar 2024 04:55:06 +0100 Subject: [PATCH] raplace a non working try by a simple if --- appslib/logging_sender.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/appslib/logging_sender.py b/appslib/logging_sender.py index 83692ff..acc1013 100644 --- a/appslib/logging_sender.py +++ b/appslib/logging_sender.py @@ -10,10 +10,8 @@ def notify(message, channel): chan_list = ["dev", "apps", "doc"] - try: - any(channel in x for x in chan_list) - except False: - logging.warning( + if not any(channel in x for x in chan_list): + logging.error( f"Provided chan '{channel}' is not part of the available options ('dev', 'apps', 'doc')." )