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.0004008576
Marked as misclassified No
Message-id <1272544329.13.0.0691505683923.issue8523@psf.upfronthosting.co.za>
In-reply-to
Content
> /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.
History
Date User Action Args
2010-04-29 12:32:09tareksetrecipients: + tarek, r.david.murray, rubenlm
2010-04-29 12:32:09tareksetmessageid: <1272544329.13.0.0691505683923.issue8523@psf.upfronthosting.co.za>
2010-04-29 12:32:07tareklinkissue8523 messages
2010-04-29 12:32:06tarekcreate