]> git.mxchange.org Git - fba.git/blobdiff - fba/config.py
Continued:
[fba.git] / fba / config.py
index 2b41be2b4ae817bd0c52ee78652ee9d781afdb6a..dc5dd22f947fcfb4896f598243c7514d5cec3d8e 100644 (file)
@@ -17,7 +17,7 @@
 import json
 
 with open("config.json") as f:
-    config = json.loads(f.read())
+    _config = json.loads(f.read())
 
 def get(key: str) -> any:
     # DEBUG: print(f"DEBUG: key[{type(key)}]={key} - CALLED!")
@@ -25,8 +25,8 @@ def get(key: str) -> any:
         raise ValueError(f"Parameter key[]='{type(key)}' is not 'str'")
     elif key == "":
         raise ValueError("Parameter 'key' cannot be empty")
-    elif not key in config:
-        raise KeyError(f"key='{key}' does not exist in config array")
+    elif not key in _config:
+        raise KeyError(f"key='{key}' does not exist in _config array")
 
-    # DEBUG: print(f"DEBUG: config[{key}]={config[key]} - EXIT!")
-    return config[key]
\ No newline at end of file
+    # DEBUG: print(f"DEBUG: _config[{key}]={_config[key]} - EXIT!")
+    return _config[key]