Jeffrey Kintscher <websur...@surf2c.net> added the comment:

I created pull request bpo-29699 to fix this issue. It adds an additional 
exception handler to ignore FileNotFoundError for most of the try blocks that 
already handle OSError.

I decided not to add it to the initial os.open() call. This should provide the 
same semantics as the "rm -r" shell command. It will fail with 
FileNotFoundError when foo is missing, which is the same behavior as "rm -r 
foo" returning "rm: foo: No such file or directory" when foo is missing. 
Similarly, "rm -rf foo" always succeeds and is equivalent to setting 
"ignore_errors=true" in the shutil.rmtree() call.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29699>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to