Skip to content

Conversation

@ffontaine
Copy link
Contributor

@ffontaine ffontaine commented Mar 5, 2025

Handle PermissionError which can be returned by os.scandir

@Wenzel
Copy link
Owner

Wenzel commented Mar 5, 2025

@ffontaine thanks for this PR
I just fixed the CI
can you rebase ?

@ffontaine
Copy link
Contributor Author

Done

yield from walk_filepath_list([Path(f)], recursive)
else:
yield from (Path(f) for f in os.scandir(path))
except PermissionError:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should catch OSError here for a more comprehensive approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Handle OSError which can be returned by os.scandir

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@ffontaine ffontaine changed the title Handle PermissionError exception Handle OSError exception Mar 6, 2025
@Wenzel Wenzel merged commit 265d45c into Wenzel:master Mar 6, 2025
9 checks passed
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.

2 participants