[1] fix environment variables

This commit is contained in:
meisnate12 2023-01-04 11:43:32 -05:00
parent 2d597021b8
commit 82e6170edd
3 changed files with 7 additions and 4 deletions

View file

@ -1 +1 @@
1.18.2
1.18.2-develop1

View file

@ -988,7 +988,7 @@ class ConfigFile:
def notify_delete(self, message, server=None, library=None):
try:
self.Webhooks.delete_webhooks(message, server=server, library=library)
self.Webhooks.delete_hooks(message, server=server, library=library)
except Failed as e:
logger.stacktrace()
logger.error(f"Webhooks Error: {e}")

View file

@ -57,7 +57,7 @@ def get_arg(env_str, default, arg_bool=False, arg_int=False):
if env_value is not None:
final_value = env_value
break
if final_value is not None:
if final_value or (arg_int and final_value == 0):
if arg_bool:
if final_value is True or final_value is False:
return final_value
@ -66,7 +66,10 @@ def get_arg(env_str, default, arg_bool=False, arg_int=False):
else:
return False
elif arg_int:
try:
return int(final_value)
except ValueError:
return default
else:
return str(final_value)
else: