diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-25 11:34:38 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-25 11:34:38 (GMT) |
commit | af4e4747f5e32ec60dbc98fdbeb9681bf3fafe64 (patch) | |
tree | 1b7ff49a9011fed33ec5d9aedd5615a68618ca48 /Lib/os.py | |
parent | 179111bd22c1e713c5e026b37300be0c63d4c204 (diff) | |
parent | 42bababba62023383291c7413a5d453374ecd933 (diff) | |
download | cpython-af4e4747f5e32ec60dbc98fdbeb9681bf3fafe64.zip cpython-af4e4747f5e32ec60dbc98fdbeb9681bf3fafe64.tar.gz cpython-af4e4747f5e32ec60dbc98fdbeb9681bf3fafe64.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
@@ -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: |