Windows cannot clean up tempdir if subfile still open

This commit is contained in:
Alan Hamlett 2017-05-21 17:09:27 -07:00
parent fac3db034f
commit f23b9cd9ef

View file

@ -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):