Author paul.moore
Recipients ivan.radic, paul.moore, r.david.murray, tim.golden, zach.ware
Date 2014-01-21.14:44:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390315445.94.0.513711693854.issue19643@psf.upfronthosting.co.za>
In-reply-to
Content
The most obvious solution would be if the onerror argument allowed for retries. At the moment, all it can do is report issues, not recover. Suppose that returning True from onerror meant "retry the operation". Then you could do

    def set_rw(operation, name, exc):
        os.chmod(name, stat.S_IWRITE)
        return True

    shutil.rmtree('path', onerror=set_rw)
History
Date User Action Args
2014-01-21 14:44:06paul.mooresetrecipients: + paul.moore, tim.golden, r.david.murray, zach.ware, ivan.radic
2014-01-21 14:44:05paul.mooresetmessageid: <1390315445.94.0.513711693854.issue19643@psf.upfronthosting.co.za>
2014-01-21 14:44:05paul.moorelinkissue19643 messages
2014-01-21 14:44:05paul.moorecreate