Ignore non-object vault config (#1258)

This commit is contained in:
red person
2026-06-02 18:55:04 +03:00
committed by GitHub
parent b29c200801
commit a901992d03
2 changed files with 11 additions and 1 deletions
+2 -1
View File
@@ -61,7 +61,8 @@ def _find_bw() -> str:
def _load_config() -> dict:
if VAULT_FILE.exists():
try:
return json.loads(VAULT_FILE.read_text(encoding="utf-8"))
data = json.loads(VAULT_FILE.read_text(encoding="utf-8"))
return data if isinstance(data, dict) else {}
except Exception:
pass
return {}