mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 09:23:26 -05:00
fix: name a missing database in one error line
This commit is contained in:
1 parent
9579f6c449
commit
4240c98359
7 files changed
+78
-16
No files matched your search
@@ -326,13 +326,15 @@ def _files_to_validate(
|
||||
|
||||
|
||||
def _load_database_if_any(path: str) -> dict | None:
|
||||
try:
|
||||
return load_database(path)
|
||||
except FileNotFoundError:
|
||||
return None
|
||||
except json.JSONDecodeError as e:
|
||||
print(f"WARNING: corrupt database.json: {e}", file=sys.stderr)
|
||||
"""The database, optional only where the default is meant.
|
||||
|
||||
A mistyped --db read as "no database" and every file passed its
|
||||
duplicate and placement checks unchecked; a damaged one did the same
|
||||
after a warning.
|
||||
"""
|
||||
if path == DEFAULT_DB and not os.path.exists(path):
|
||||
return None
|
||||
return load_database(path)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
|
||||
Reference in new issue
Block a user