Voice et bot modif
This commit is contained in:
parent
189d56026b
commit
7333a22bcd
10774 changed files with 634644 additions and 933308 deletions
|
|
@ -30,18 +30,18 @@ def set_conf_env(conf_dict, envdict=os.environ):
|
|||
envdict : dict-like(str, str)
|
||||
Source for the values - usually the real environment
|
||||
"""
|
||||
envdict = dict(envdict)
|
||||
kwarg_keys = []
|
||||
for key in envdict:
|
||||
if key.startswith("FSSPEC_") and len(key) > 7 and key[7] != "_":
|
||||
try:
|
||||
value = json.loads(envdict[key])
|
||||
envdict[key] = value
|
||||
except json.decoder.JSONDecodeError:
|
||||
value = envdict[key]
|
||||
if key.count("_") > 1:
|
||||
kwarg_keys.append(key)
|
||||
continue
|
||||
try:
|
||||
value = json.loads(envdict[key])
|
||||
except json.decoder.JSONDecodeError as ex:
|
||||
warnings.warn(
|
||||
f"Ignoring environment variable {key} due to a parse failure: {ex}"
|
||||
)
|
||||
else:
|
||||
if isinstance(value, dict):
|
||||
_, proto = key.split("_", 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue