Repository navigation
Conversation
… skip os.walk dropped an unreadable subtree, so .rpf archives under it never reached the census and the run still exited 0. Walk with an onerror that raises and surface it as the file's usual error + rc 2. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 3f7957fa7 on Windows 11: pytest tests/test_vertex_types.py -q -> 43 passed, 8 subtests passed; git diff --check clean.
An input directory that cannot be listed is now an error (exit 2) instead of an empty type set; the added tests cover the unreadable directory and the ordinary path. No blocking issue.
|
Heads up, no contest intended: #4417 (opened 01:20 UTC, branch Your AI-assisted. |
|
Tested 3f7957f merged with main 98fa503 on Linux (WSL2), Python 3.12.16, CPU only: pass
|
|
Closing as a duplicate — @SebSilent's #4417 (opened 01:20 UTC, ~3.5h before this PR) already adds the same raising |
|
Tested
|
Item: BUILD item claimed in #4683 (claim) — the
os.walkpass.tools/vertex_types.pycollects.rpfarchives from each user-supplied input directory withos.walkand noonerror, soos.walktreats an unreadable subtree as empty: archives under it never reach the census and the run still exits 0 with plausible-looking totals.The fix walks with an
onerrorthat re-raises and catchesOSErroraround the collection loop, reporting the file's usualerror: <input>: <err>+ rc 2 — the same surface per-archive read failures already get at the scan loop.Test:
tests/test_vertex_types.pygainstest_an_unreadable_directory_is_an_error_not_a_skip— patchesos.scandirto fail one directory (synthetic, no game data). Red on98fa503f(rc 0, silent skip), green here (rc 2, oneerror:line naming the directory). The existing walk-order test'sos.walkstub now tolerates theonerrorkwarg. 43/43 pass;compileallandgit diff --checkclean.AI-assisted (Devin). No GPU needed — CPU-only tool.