From 0ec7ba737006c4935726f59847add5782c7657b5 Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Thu, 17 Jan 2019 10:23:30 -0700 Subject: TEMPFILEPRFIX test changed back Testing "if not prefix" would return false if an empty string is passed, but that setting should be valid. Signed-off-by: Mats Wichmann --- src/engine/SCons/Platform/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py index ab064ce..3168378 100644 --- a/src/engine/SCons/Platform/__init__.py +++ b/src/engine/SCons/Platform/__init__.py @@ -194,7 +194,7 @@ class TempFileMunge(object): node = target[0] if SCons.Util.is_List(target) else target cmdlist = getattr(node.attributes, 'tempfile_cmdlist', None) \ if node is not None else None - if cmdlist is not None : + if cmdlist is not None: return cmdlist # We do a normpath because mktemp() has what appears to be @@ -202,11 +202,12 @@ class TempFileMunge(object): # delimiter. Windows' link mistakes that for a command line # switch and barfs. # - # We use the .lnk suffix for the benefit of the Phar Lap + # Default to the .lnk suffix for the benefit of the Phar Lap # linkloc linker, which likes to append an .lnk suffix if # none is given. - suffix = env.subst('$TEMPFILESUFFIX') - if not suffix: + if env.has_key('TEMPFILESUFFIX'): + suffix = env.subst('$TEMPFILESUFFIX') + else: suffix = '.lnk' fd, tmp = tempfile.mkstemp(suffix, text=True) -- cgit v0.12