Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions Lib/os.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,12 +539,7 @@ def _fwalk(stack, isbytes, topdown, onerror, follow_symlinks):
else:
nondirs.append(name)
except OSError:
try:
# Add dangling symlinks, ignore disappeared files
if entry.is_symlink():
nondirs.append(name)
except OSError:
pass
nondirs.append(name)

if topdown:
yield toppath, dirs, nondirs, topfd
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Slightly speed up :func:`os.fwalk` by simplifying handling of inaccessible
files.