Update __init__.py

This commit is contained in:
HibiKier 2021-11-09 18:04:33 +08:00 committed by GitHub
parent 17506691a8
commit b70851b810
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,10 +112,11 @@ class ConfigsManager:
"""
key = key.upper()
if module in self._data.keys():
if self._data[module].get(key) is not None:
if self._data[module][key]["value"] is None:
return self._data[module][key]["default_value"]
return self._data[module][key]["value"]
for key in [key, f"{key} [LEVEL]"]:
if self._data[module].get(key) is not None:
if self._data[module][key]["value"] is None:
return self._data[module][key]["default_value"]
return self._data[module][key]["value"]
return None
def get(self, key: str):