Use $TMPDIR if it is set in the environment.

This commit is contained in:
Guido van Rossum 1992-01-14 18:31:56 +00:00
parent a61ff7b160
commit cff3454eff
1 changed files with 6 additions and 1 deletions

View File

@ -5,11 +5,16 @@ import path
# Changeable parameters (by clients!)...
# XXX Should the environment variable $TMPDIR override tempdir?
tempdir = '/usr/tmp'
template = '@'
# Use environment variable $TMPDIR to override default tempdir.
if posix.environ.has_key('TMPDIR'):
# XXX Could check that it's a writable directory...
tempdir = posix.environ['TMPDIR']
# Counter for generating unique names