This commit is contained in:
magmaus3 2023-06-09 14:46:23 +02:00
parent 87cdfc817c
commit 7de0dabb54
Signed by: magmaus3
GPG key ID: 966755D3F4A9B251

View file

@ -23,7 +23,10 @@ def config_value(key: str, default_value=""):
The value must be in json format!"""
if key in os.environ:
return json.loads(os.environ[key])
try:
return json.loads(os.environ[key])
except json.JSONDecodeError:
return os.environ[key]
else:
return default_value