import json
with open("config.json") as f:
+ # DEBUG: print("DEBUG: Loading configuration file ...")
_config = json.loads(f.read())
def get(key: str) -> any:
# DEBUG: print(f"DEBUG: key[{type(key)}]={key} - CALLED!")
- if type(key) != str:
+ if not isinstance(key, str):
raise ValueError(f"Parameter key[]='{type(key)}' is not 'str'")
elif key == "":
- raise ValueError("Parameter 'key' cannot be empty")
+ raise ValueError("Parameter 'key' is empty")
elif not key in _config:
raise KeyError(f"key='{key}' does not exist in _config array")