refactor: quality audit fixes, honest verification reporting

- batocera_scraper: fix OrderedDict parsing for ast.literal_eval
- auto_fetch: fix TypeError when sha1/md5 is None
- verify: filter non-ZIP files for zipped_file entries (F2)
- verify: distinguish ZIP read errors from hash mismatches (F5)
- generate_pack: track seen_destinations with source hash (F7)

Batocera ep64/ep128.zip now correctly reported as MISSING
instead of false UNTESTED (resolved to .rom instead of .zip)
This commit is contained in:
Abdessamad Derraz
2026-03-17 15:35:30 +01:00
parent 5ab82a7898
commit 8d81aee235
4 changed files with 22 additions and 13 deletions

View File

@@ -150,7 +150,9 @@ class Scraper(BaseScraper):
clean_dict_str = "\n".join(lines)
clean_dict_str = clean_dict_str.replace("OrderedDict(", "dict(")
# OrderedDict({...}) -> just the inner dict literal
clean_dict_str = re.sub(r'OrderedDict\(\s*\{', '{', clean_dict_str)
clean_dict_str = re.sub(r'\}\s*\)', '}', clean_dict_str)
try:
return ast.literal_eval(clean_dict_str)