fixes
This commit is contained in:
parent
87cdfc817c
commit
7de0dabb54
1 changed files with 4 additions and 1 deletions
|
@ -23,7 +23,10 @@ def config_value(key: str, default_value=""):
|
||||||
|
|
||||||
The value must be in json format!"""
|
The value must be in json format!"""
|
||||||
if key in os.environ:
|
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:
|
else:
|
||||||
return default_value
|
return default_value
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue