Skip to content

Distinguish a missing package path from a non-ZIP file - #1597

Open
DSeaStar wants to merge 1 commit into
python-openxml:masterfrom
DSeaStar:fix/distinguish-missing-path-from-non-zip
Open

Distinguish a missing package path from a non-ZIP file#1597
DSeaStar wants to merge 1 commit into
python-openxml:masterfrom
DSeaStar:fix/distinguish-missing-path-from-non-zip

Conversation

@DSeaStar

Copy link
Copy Markdown

PhysPkgReader treated a missing path and an existing non-ZIP file the same way, raising PackageNotFoundError: Package not found at '...' for both. That made a simple "file not found" look like a packaging problem.

A path that is not a file now raises FileNotFoundError. A path that exists but is not a ZIP archive still raises PackageNotFoundError, with a message that says so.

Fixes #1410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: distinguish "no such file" from "not a ZIP"

1 participant