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
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
shutil.rmtree(u(self.name))
|
||||
try:
|
||||
shutil.rmtree(u(self.name))
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
class NamedTemporaryFile(object):
|
||||
|
|
Loading…
Reference in a new issue