From: Guido van Rossum Date: Thu, 8 Aug 1996 18:33:56 +0000 (+0000) Subject: Restore 1.3 behavior of gettempdir(): if tempdir is already set, believe it. X-Git-Tag: v1.4b2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4033ad7576713fea34ec34f9922d26d972358178;p=python Restore 1.3 behavior of gettempdir(): if tempdir is already set, believe it. --- diff --git a/Lib/tempfile.py b/Lib/tempfile.py index f95920d5a4..c1413898b5 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -18,6 +18,8 @@ template = None def gettempdir(): global tempdir + if tempdir is not None: + return tempdir attempdirs = ['/usr/tmp', '/tmp', os.getcwd(), os.curdir] if os.environ.has_key('TMPDIR'): attempdirs.insert(0, os.environ['TMPDIR'])