This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tarek
Recipients r.david.murray, rubenlm, tarek
Date 2010-04-29.12:32:06
SpamBayes Score 0.000400858
Marked as misclassified No
Message-id <>
> /1 seems ok to me but to make use of the global status it provides 
> the user must write a somewhat complex recovery code.

The onerror() code you did is as complex as a global function working with a sequence returned by rmtree, since it is used *everywhere* in rmtree, and not only for os.listdir issues. IOW, if you didn't handle other possible failures than os.listdir errors, it will fail if rmtree calls it for other APIs like os.remove, etc..

If we state that onerror() is not used as a fallback in rmtree(), and do whatever it wants to do on its side, in an isolated manner, then I find it simpler that this function works will a list of paths rmtree() failed to removed, at the end of the rmtree() process. 

I'd be curious to see your onerror() function btw: if it's here just to silent permission errors, 1/ would make it even simpler: don't deal with the error list returned by rmtree() that's all.
Date User Action Args
2010-04-29 12:32:09tareksetrecipients: + tarek, r.david.murray, rubenlm
2010-04-29 12:32:09tareksetmessageid: <>
2010-04-29 12:32:07tareklinkissue8523 messages
2010-04-29 12:32:06tarekcreate