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

bugfix: change order in exception handling #644

Closed

Conversation

helboukkouri
Copy link

Hi @TimDettmers 👋🏼

It seems, in this try / except statement, that PermissionError should be above OSError.

In fact, it just happens that PermissionError is an instance of OSError, which means that any parsed paths that the user don't have access to will raise an exception and interrupt the execution 🙂

The proposed change is a simple reordering of the except statements.

@fozziethebeat
Copy link
Contributor

Bump for this getting merged. Its a small fix that should solve a reported issue

@chuxi
Copy link

chuxi commented Sep 8, 2023

anybody could help this pr? it helps resolve the problem when I have postgresql installed and the PGDATA dir is available in /etc/profiles.d, which causes the same problem.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@github-actions github-actions bot closed this Dec 29, 2023
@TimDettmers
Copy link
Collaborator

Sorry for the slowness. This is now merged.

@helboukkouri helboukkouri deleted the patch-1 branch March 1, 2024 12:26
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.

4 participants