provide a dummy __exit__ on windows

This commit is contained in:
Benjamin Peterson 2009-06-30 22:14:33 +00:00
parent 1b90efbdc5
commit 31f42ab254
1 changed files with 3 additions and 0 deletions

View File

@ -411,6 +411,9 @@ class _TemporaryFileWrapper:
result = self.file.__exit__(exc, value, tb) result = self.file.__exit__(exc, value, tb)
self.close() self.close()
return result return result
else:
def __exit__(self, exc, value, tb):
pass
def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="", def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="",