[issue19643] shutil rmtree fails on readonly files in Windows

Tim Golden report at bugs.python.org
Wed May 7 12:17:08 CEST 2014


Tim Golden added the comment:

The attached patch adds an example to the shutil documentation showing how to use an onerror handler to reattempt the removal of a read-only file. It's deliberately low-tech and simply removes the attribute and retries. If there's some other obstacle, it will continue to fail as it would have done in any case.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19643>
_______________________________________


More information about the Python-bugs-list mailing list