From 31f42ab254e4a4baf120b996f0b9a85deacc744d Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 30 Jun 2009 22:14:33 +0000 Subject: [PATCH] provide a dummy __exit__ on windows --- Lib/tempfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/tempfile.py b/Lib/tempfile.py index b0fd87d3a9b..92fb040c4a7 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -411,6 +411,9 @@ class _TemporaryFileWrapper: result = self.file.__exit__(exc, value, tb) self.close() return result + else: + def __exit__(self, exc, value, tb): + pass def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="",