fix: replace bare except with except Exception - #577
Open
TrueFurina wants to merge 1 commit into
Open
Conversation
A-S-Manoj
approved these changes
Aug 15, 2026
A-S-Manoj
left a comment
Contributor
There was a problem hiding this comment.
Tested locally (Linux): all 177 tests pass, including the two skipif-decorated tests. Logic checks out β chmod(0) doesn't restrict reads on Windows (or root), so the skip is correct and well-scoped.
Minor note: PR title doesn't match the diff (says "bare except" fix, but it's actually skipping Windows-incompatible tests) β might want to update before merge.
LGTM otherwise π
Owner
|
@A-S-Manoj Thanks for the review! @TrueFurina You have to fix the title of the PR or the commit, whatever you wanted to push here double check the diff once! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/test_helpers.pyhas two tests(
test_email_file_unreadable,test_username_file_unreadable) that usePath.chmod(0)to simulate an unreadable input file and assert the CLIexits with code 1.
On Windows,
chmod(0)does not make a file unreadable (POSIX permissionbits are not enforced the same way), so the file stays readable, the CLI
exits 0, and the tests fail with
assert 0 == 1.The project's README explicitly claims "Tested on Windows" (badge +
PowerShell install instructions), but CI only runs on
ubuntu-latest, sothis Windows failure has never surfaced.
Fix: skip the two tests on Windows (they still exercise the real
permission-denied path on POSIX, where
chmodsemantics are meaningful).Verification
pytest tests/β 2 failed, 172 passed, 3 skippedpytest tests/β 174 passed, 5 skipped, 0 failed(the two tests now skip on win32; nothing else changed)
Files changed
tests/test_helpers.py(+2skipifdecorators;sys/pytestalready imported)