fix: address whole-branch review findings for update-swarm
- versions: require entire normalized string to be numeric so dates and hotfix suffixes compare as incomparable instead of eq/gt - hosts: exact host or dot-suffix match rejects lookalikes like notmediafire.com and evilmega.nz; GitHub stays exact-set - census: lazy extractor loop so a later OSError no longer discards an earlier sidecar changelog hit - jobs: watchlist parses only table rows whose vault-note cell is a bare wikilink (skips parenthetical related/complete notes); wanted also matches bold names in Wanted.md tables with Pokemon prefix stripped and casefolded - cli: validate-scouts and judge raise SystemExit when jobs.json has jobs but scouts/ has zero valid files - fetch: download forwards timeout=60 to urlopen and writes to a .part file then os.replace, removing the partial on any failure
This commit is contained in:
1 parent
37ebc97b51
commit
cb294f72a0
16 files changed
+234
-48
No files matched your search
@@ -80,12 +80,17 @@ def census_job(job: dict, file_path: str | None) -> dict:
|
||||
}
|
||||
if file_path and os.path.isfile(file_path):
|
||||
rec["sha256"], rec["size"] = _sha_size(file_path)
|
||||
for found, evidence in (
|
||||
(_sidecar_version(file_path), "sidecar"),
|
||||
(_zip_version(file_path), "zip"),
|
||||
(_filename_version(file_path), "filename"),
|
||||
(_rom_version(file_path), "rom-bytes"),
|
||||
):
|
||||
extractors = (
|
||||
(_sidecar_version, "sidecar"),
|
||||
(_zip_version, "zip"),
|
||||
(_filename_version, "filename"),
|
||||
(_rom_version, "rom-bytes"),
|
||||
)
|
||||
for fn, evidence in extractors:
|
||||
try:
|
||||
found = fn(file_path)
|
||||
except OSError:
|
||||
found = None
|
||||
if found:
|
||||
rec["installed_version"] = found
|
||||
rec["source"] = "file"
|
||||
|
||||
Reference in new issue
Block a user