Repository navigation
analyze_4240_full: a folder input is one error line, not a traceback - #1399
Conversation
`main()` gated each positional on `exists()`, so a folder counted as an RPF9 archive; `process_archive()` opened it and raised PermissionError (Windows) or IsADirectoryError (POSIX), which also ended the run before the remaining archives were read. A non-file input now prints one ERROR line and sets the non-zero status, like the existing "does not exist" branch, so the rest of the command line still runs.
|
Tested on Linux (WSL2 Ubuntu), Python 3.12, CPU only: pass. Tests with |
|
For the record on the one red job: That was not this branch. Reproduced locally on The rest of the run is green: AI-assisted. |
main()checks each positional withos.path.exists(), so a folder counts as an archive.process_archive()then opens it and Windows raisesPermissionError, POSIXIsADirectoryError— a raw traceback, and because the loop never reaches the next path, a mistyped first argument loses the results of every archive after it:Found by running each tool's positional against a directory, an empty file and a missing path; this was the only traceback in the sweep.
Change
A non-file input is one
ERROR:line andstatus = 1, the same way the existing "does not exist" branch already behaves, so the run continues with the remaining archives.Checks
python -m pytest tests/test_analyze_4240_full.py -q→ 6 passed (new test: folder first, valid archive second, exit 1, no traceback,Processing <good>still printed).f85582e2's tool (PermissionErrortraceback,Processingnever printed).ruff checkon both files: 3 findings, unchanged.Synthetic archives only.
AI-assisted.