Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress OSError when searching config files #182

Closed
wants to merge 1 commit into from

Conversation

FFY00
Copy link
Member

@FFY00 FFY00 commented Sep 28, 2022

Fixes #181

Signed-off-by: Filipe Laíns lains@riseup.net

Fixes pypa#181

Signed-off-by: Filipe Laíns <lains@riseup.net>
@jaraco
Copy link
Member

jaraco commented Sep 29, 2022

Thanks for the PR. I specifically aimed to avoid the init/for/append construct, so I'd like not to re-introduce that. Also, I wonder if this bug deserves a regression test (so the fix isn't optimized away). I'm tempted to recommend just going back to os.path.isfile(path) for the check, but only if there's a regression test to capture the discovered expectation. Otherwise, I'd recommend to create a separate function that documents the untested expectation.

@jaraco
Copy link
Member

jaraco commented Sep 29, 2022

In be45b47, I've added an xfailing test.

@jaraco
Copy link
Member

jaraco commented Sep 29, 2022

Ugh. That test is no good. The permission error is coming from the setup and not the find_config_files call.

@jaraco
Copy link
Member

jaraco commented Sep 29, 2022

The proposed change is superseded by e1fe8bd.

@jaraco jaraco closed this Sep 29, 2022
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.

[BUG] Change to pathlib causes Permission Errors when checking for config files
2 participants