Issue #25860: os.fwalk() no longer skips remaining directories when error occurs.

Original patch by Samson Lee.
This commit is contained in:
Serhiy Storchaka 2015-12-23 00:08:24 +02:00
parent 0ce7a3a34c
commit 0bddc9eb15
3 changed files with 24 additions and 12 deletions

View file

@ -514,7 +514,7 @@ if {open, stat} <= supports_dir_fd and {listdir, stat} <= supports_fd:
except OSError as err:
if onerror is not None:
onerror(err)
return
continue
try:
if follow_symlinks or path.samestat(orig_st, stat(dirfd)):
dirpath = path.join(toppath, name)