This commit is contained in:
Christian Fraß 2024-06-01 13:26:08 +02:00
parent c9e8895a1d
commit f0d1683050

View file

@ -62,10 +62,11 @@ def conf_load(
path : str path : str
): ):
global _conf_data global _conf_data
if (not _os.path.exists(path)): conf_data_raw = (
pass _json.loads(file_read(path))
else: if _os.path.exists(path) else
conf_data_raw = _json.loads(file_read(path)) {}
)
for pair in conf_data_raw.get("url", {}).items(): for pair in conf_data_raw.get("url", {}).items():
if ("host" in pair[1]): if ("host" in pair[1]):
pass pass
@ -114,6 +115,7 @@ def conf_load(
"password": conf_data_raw.get("account", {}).get("password", None), "password": conf_data_raw.get("account", {}).get("password", None),
} }
} }
print(_json.dumps(_conf_data, indent = "\t"))
def conf_get( def conf_get(