mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Restore 1.3 behavior of gettempdir(): if tempdir is already set, believe it.
This commit is contained in:
parent
0523d63a5c
commit
4033ad7576
1 changed files with 2 additions and 0 deletions
|
@ -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'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue