]> granicus.if.org Git - python/commitdiff
proxy the __exit__ call
authorBenjamin Peterson <benjamin@python.org>
Wed, 1 Jul 2009 13:34:35 +0000 (13:34 +0000)
committerBenjamin Peterson <benjamin@python.org>
Wed, 1 Jul 2009 13:34:35 +0000 (13:34 +0000)
Lib/tempfile.py

index 92fb040c4a73c121cc7e10bd8c2385fc44c117f2..1c718145d39bdb477c08c45f27167b3ed98d986a 100644 (file)
@@ -413,7 +413,7 @@ class _TemporaryFileWrapper:
             return result
     else:
         def __exit__(self, exc, value, tb):
-            pass
+            self.file.__exit__(exc, value, tb)
 
 
 def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="",