raplace a non working try by a simple if

This commit is contained in:
OniriCorpe 2024-03-15 04:55:06 +01:00 committed by Salamandar
parent 5331b7f19a
commit 9d30b81055

View file

@ -10,10 +10,8 @@ def notify(message, channel):
chan_list = ["dev", "apps", "doc"] chan_list = ["dev", "apps", "doc"]
try: if not any(channel in x for x in chan_list):
any(channel in x for x in chan_list) logging.error(
except False:
logging.warning(
f"Provided chan '{channel}' is not part of the available options ('dev', 'apps', 'doc')." f"Provided chan '{channel}' is not part of the available options ('dev', 'apps', 'doc')."
) )