Windows cannot clean up tempdir if subfile still open
This commit is contained in:
parent
fac3db034f
commit
f23b9cd9ef
1 changed files with 4 additions and 1 deletions
|
@ -76,7 +76,10 @@ except ImportError:
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
def __exit__(self, exc_type, exc_value, traceback):
|
def __exit__(self, exc_type, exc_value, traceback):
|
||||||
|
try:
|
||||||
shutil.rmtree(u(self.name))
|
shutil.rmtree(u(self.name))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class NamedTemporaryFile(object):
|
class NamedTemporaryFile(object):
|
||||||
|
|
Loading…
Reference in a new issue