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