summaryrefslogtreecommitdiffstats
path: root/SCons/Environment.py
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2020-05-22 16:21:31 (GMT)
committerMats Wichmann <mats@linux.com>2020-05-22 16:26:44 (GMT)
commit2003ff3fec129cb9b3ebd34d4f5e96ef0f0adddc (patch)
tree2a311421c869b9c92db2e59bf69286df7abbefd3 /SCons/Environment.py
parentb3385517839bcd0d7b1886055564861343683c5b (diff)
downloadSCons-2003ff3fec129cb9b3ebd34d4f5e96ef0f0adddc.zip
SCons-2003ff3fec129cb9b3ebd34d4f5e96ef0f0adddc.tar.gz
SCons-2003ff3fec129cb9b3ebd34d4f5e96ef0f0adddc.tar.bz2
If ParseFlags called with dict argument, leave unchanged
Previously, if the dict values were mutable elements, i.e. lists, and the key was not for a *PATH variable, the value would be reversed before being processed into the env. Instead use a slice to iterate over. Fixes issue #3665 Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Environment.py')
-rw-r--r--SCons/Environment.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/SCons/Environment.py b/SCons/Environment.py
index 00379e1..db8af11 100644
--- a/SCons/Environment.py
+++ b/SCons/Environment.py
@@ -855,8 +855,7 @@ class SubstitutionEnvironment(object):
t.append(v)
else:
### keep right-most occurence
- orig.reverse()
- for v in orig:
+ for v in orig[::-1]:
if v not in t:
t.insert(0, v)
self[key] = t