summaryrefslogtreecommitdiffstats
path: root/Lib/tempfile.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-08 18:33:56 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-08 18:33:56 (GMT)
commit4033ad7576713fea34ec34f9922d26d972358178 (patch)
tree46c05ba627dcecccddca2e59bde0c8da4d0657d5 /Lib/tempfile.py
parent0523d63a5ca872c46e66f27113e6346a8c602b30 (diff)
downloadcpython-4033ad7576713fea34ec34f9922d26d972358178.zip
cpython-4033ad7576713fea34ec34f9922d26d972358178.tar.gz
cpython-4033ad7576713fea34ec34f9922d26d972358178.tar.bz2
Restore 1.3 behavior of gettempdir(): if tempdir is already set, believe it.
Diffstat (limited to 'Lib/tempfile.py')
-rw-r--r--Lib/tempfile.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index f95920d..c141389 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'])