Catch permissionerrors too, since Windows seems to produce them occasionally.
This commit is contained in:
parent
e245bdbdc0
commit
dc70916ca4
|
@ -58,9 +58,10 @@ class AutoDeletedDir():
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(self.dir)
|
shutil.rmtree(self.dir)
|
||||||
return
|
return
|
||||||
except OSError:
|
except (OSError, PermissionError):
|
||||||
if i == retries - 1:
|
if i == retries - 1:
|
||||||
raise
|
mlog.warning('Could not delete temporary directory.')
|
||||||
|
return
|
||||||
time.sleep(0.1 * (2**i))
|
time.sleep(0.1 * (2**i))
|
||||||
|
|
||||||
failing_logs = []
|
failing_logs = []
|
||||||
|
|
Loading…
Reference in New Issue