Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-119169: Simplifyos.fwalk() exception handling#121432

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
barneygale wants to merge3 commits intopython:main
base:main
Choose a base branch
Loading
frombarneygale:os-fwalk-speedup

Conversation

@barneygale
Copy link
Contributor

@barneygalebarneygale commentedJul 6, 2024
edited
Loading

os.DirEntry.is_dir() already returns false when a file disappears, so theis_symlink() call is redundant. This bringsfwalk()'s exception handling more in line withwalk().

Handle "disappearing" files as in `walk()`: add them to the `nondirs` listrather than omitting them entirely.
@barneygalebarneygale added the performancePerformance or resource usage labelJul 6, 2024
@barneygalebarneygale changed the titleGH-119169: Slightly speed upos.fwalk()GH-119169: Slightlyos.fwalk() exception handlingJul 6, 2024
@barneygalebarneygale changed the titleGH-119169: Slightlyos.fwalk() exception handlingGH-119169: Simplifyos.fwalk() exception handlingJul 6, 2024
@serhiy-storchaka
Copy link
Member

What ifis_dir() fails for other reason? For example, what will happen if the filesystem is unmounted or removable storage is removed or connection fails for NFS? I have doubt thatstat() will simply return ENOENT in these cases.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

awaiting core reviewperformancePerformance or resource usage

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@barneygale@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp