Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d39acd4acb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| with zipfile.ZipFile(harzip) as zf: | ||
| try: | ||
| archive = zipfile.ZipFile(harzip) |
There was a problem hiding this comment.
Catch BadZipFile raised while reading har.har
When a ZIP's central directory is valid but its har.har bytes fail CRC validation, ZipFile(harzip) succeeds and this new try ends, then zf.read("har.har") raises zipfile.BadZipFile outside the handler. Running the CLI on such a damaged HAR still produces an uncaught traceback and no Invalid ZIP archive message, so the clean-error handling needs to cover the initial member read as well.
Useful? React with 👍 / 👎.
Summary
Invalid input such as a plain text file currently raises an uncaught
zipfile.BadZipFilefromZipFile(...). Convert it to a clear CLI error and add a regression test. Fixes #321.Evidence
main; invalid input produces no user-facing Click error.Invalid ZIP archive, and includes no traceback.python3 -m unittest -v test_extract_harfrom thepythondirectory.Merge Danger
Door: two-way
Blast Radius: narrow