Restore 1.3 behavior of gettempdir(): if tempdir is already set, believe it.

This commit is contained in:
Guido van Rossum 1996-08-08 18:33:56 +00:00
parent 0523d63a5c
commit 4033ad7576

View file

@ -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'])