]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
mktemp() shouldn't rely on os.path.exists(), which can return False if
authorGuido van Rossum <guido@python.org>
Mon, 10 Nov 2003 02:16:36 +0000 (02:16 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 10 Nov 2003 02:16:36 +0000 (02:16 +0000)
commitb25615939663823c462c4d441f5c808a9aa38891
treec4bd2a883aff63188be62959228420fa1d957966
parentf09994e5273e358c5fc764db681bd3dafecc3e2d
mktemp() shouldn't rely on os.path.exists(), which can return False if
the file is a symlink.  Instead, use os.lstat directly, if it exists;
fall back on os.stat or the built-in open.  Thanks to Iustin Pop.
Lib/tempfile.py