summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/os.py')
-rw-r--r--Lib/os.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 0c9107c..71ed088 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -481,13 +481,13 @@ if {open, stat} <= supports_dir_fd and {listdir, stat} <= supports_fd:
dirs.append(name)
else:
nondirs.append(name)
- except FileNotFoundError:
+ except OSError:
try:
# Add dangling symlinks, ignore disappeared files
if st.S_ISLNK(stat(name, dir_fd=topfd, follow_symlinks=False)
.st_mode):
nondirs.append(name)
- except FileNotFoundError:
+ except OSError:
continue
if topdown: