Message208647
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) |
|
Date |
User |
Action |
Args |
2014-01-21 14:44:06 | paul.moore | set | recipients:
+ paul.moore, tim.golden, r.david.murray, zach.ware, ivan.radic |
2014-01-21 14:44:05 | paul.moore | set | messageid: <1390315445.94.0.513711693854.issue19643@psf.upfronthosting.co.za> |
2014-01-21 14:44:05 | paul.moore | link | issue19643 messages |
2014-01-21 14:44:05 | paul.moore | create | |
|