fix: refuse a platform scrape that lists no file

scraper_cli wrote a platform YAML with no system when the parse came back
empty, and exited 0. It now exits 1 before writing, unless the scraper
declares lists_files = False (RetroPie, whose files are inherited); RetroPie
in turn raises when its archive declares no package.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 05:07:33 +02:00
1 parent 981468874c
commit 6318eaa28b
3 files changed
+82

No files matched your search

+4
View File
@@ -59,6 +59,8 @@ _PACKAGE_DIRS = _SCRIPT_SECTIONS
class Scraper(BaseScraper):
"""Scraper for the RetroPie package list."""
lists_files = False
def __init__(self, url: str | None = None) -> None:
# The package list is read from master: the commit read is recorded.
if url is None:
@@ -122,6 +124,8 @@ class Scraper(BaseScraper):
else:
found.add(match.group(1))
if not found:
raise ValueError(f"{self.url}: no rp_module_id under {SCRIPTMODULES}/")
self._modules = sorted(found)
return self._modules