[issue8523] shutil.rmtree and os.listdir cannot recover on error conditions
Tarek Ziadé
report at bugs.python.org
Thu Apr 29 16:21:32 CEST 2010
Tarek Ziadé <ziade.tarek at gmail.com> added the comment:
Looking at your example rubenlm, it appears like a case that is missing in rmtree().
You are trying to chmod your tree if a file in there cannot be removed because of the permissions. This sounds like something we need to add in rmtree() directly, for example under a "force_permissions" flag that would handle permission failures by trying to chmod.
I think rmtree() should not try to delegate the hard work to third party code, and should try to handle as much failures as possible,
and just return errors.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8523>
_______________________________________
More information about the Python-bugs-list
mailing list