diff options
author | Guido van Rossum <guido@python.org> | 1996-08-08 18:33:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-08 18:33:56 (GMT) |
commit | 4033ad7576713fea34ec34f9922d26d972358178 (patch) | |
tree | 46c05ba627dcecccddca2e59bde0c8da4d0657d5 /Lib | |
parent | 0523d63a5ca872c46e66f27113e6346a8c602b30 (diff) | |
download | cpython-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')
-rw-r--r-- | Lib/tempfile.py | 2 |
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']) |