diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-25 11:28:38 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-25 11:28:38 (GMT) |
commit | 42bababba62023383291c7413a5d453374ecd933 (patch) | |
tree | 72a1291a7ef660c580f4f02f3e835c064b12721f /Lib/os.py | |
parent | 036fb15435a2b5fb8acb200ee694b1d50c87a3a9 (diff) | |
download | cpython-42bababba62023383291c7413a5d453374ecd933.zip cpython-42bababba62023383291c7413a5d453374ecd933.tar.gz cpython-42bababba62023383291c7413a5d453374ecd933.tar.bz2 |
Issue #28353: os.fwalk() no longer fails on broken links.
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -537,13 +537,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: |