From: Benjamin Peterson Date: Tue, 30 Jun 2009 22:14:33 +0000 (+0000) Subject: provide a dummy __exit__ on windows X-Git-Tag: v2.7a1~867 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31f42ab254e4a4baf120b996f0b9a85deacc744d;p=python provide a dummy __exit__ on windows --- diff --git a/Lib/tempfile.py b/Lib/tempfile.py index b0fd87d3a9..92fb040c4a 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="",