From 4033ad7576713fea34ec34f9922d26d972358178 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 8 Aug 1996 18:33:56 +0000 Subject: [PATCH] Restore 1.3 behavior of gettempdir(): if tempdir is already set, believe it. --- Lib/tempfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/tempfile.py b/Lib/tempfile.py index f95920d5a4a..c1413898b52 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -18,6 +18,8 @@ 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'])