[HOTFIX] Catch RomsNotFoundException in scan file precalculation

This commit is contained in:
Georges-Antoine Assi
2025-12-09 08:53:28 -05:00
parent 307a3f3dc3
commit 76e67c7844
2 changed files with 8 additions and 2 deletions

View File

@@ -621,8 +621,12 @@ async def scan_platforms(
# Precalculate total platforms and ROMs
total_roms = 0
for platform_slug in fs_platforms:
fs_roms = await fs_rom_handler.get_roms(Platform(fs_slug=platform_slug))
total_roms += len(fs_roms)
try:
fs_roms = await fs_rom_handler.get_roms(Platform(fs_slug=platform_slug))
total_roms += len(fs_roms)
except RomsNotFoundException as e:
log.error(e)
await scan_stats.update(
socket_manager=socket_manager,
total_platforms=len(fs_platforms),

View File

@@ -1140,6 +1140,7 @@ class TestExtractCHDHash:
result = extract_chd_hash(chd_file)
assert result
assert result == "0" * 40
assert len(result) == 40
@@ -1157,5 +1158,6 @@ class TestExtractCHDHash:
result = extract_chd_hash(chd_file)
assert result
assert result == "f" * 40
assert len(result) == 40