New submission from Samson Lee:
I noticed os.fwalk() produced different results as os.walk(). It turned out
that os.fwalk() skips all remaining directories when OSError occurs (e.g. due
to PermissionError).
To reproduce the bug, first create a test directory structure:
$ mkdir 1; touch 1/a
Changes by Samson Lee :
--
nosy: +hynek, neologix
___
Python tracker
<http://bugs.python.org/issue25860>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Samson Lee :
--
nosy: +benhoyt, haypo
___
Python tracker
<http://bugs.python.org/issue25860>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Samson Lee:
The bug is os.fwalk() crashes with unhandled exception when there is an error
accessing symbolic link targets.
To reproduce the bug, create a symbolic link that targets a file that you do not
have permission to access:
$ touch handsoff
$ sudo chown
Samson Lee added the comment:
Similar to http://bugs.python.org/issue25860
--
nosy: +serhiy.storchaka
___
Python tracker
<http://bugs.python.org/issue28
Samson Lee added the comment:
Sorry, the target file needs to be in a directory you don't have permission to
access:
$ mkdir handsoff
$ sudo chown root:root handsoff
$ sudo chmod 700 handsoff
$ ln -s handsoff/anything
Samson Lee added the comment:
This is definitely a bug because there is no way an unhandled exception like
this is acceptable behaviour. The behaviour is that the fwalk iteration will
stop and there is no way to recover / continue. Also fwalk takes an onerror
callback function that won'