summaryrefslogtreecommitdiff
path: root/SCons/Environment.py
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2020-07-31 16:12:09 -0600
committerMats Wichmann <mats@linux.com>2020-07-31 16:12:09 -0600
commitf74c9aa5b64543ebecce5528ed117a0f5026e4a6 (patch)
tree5c41c58a1d1f68b342915008c451ce09d06f9fc8 /SCons/Environment.py
parent2f85d806945f81e5dae1cf1bc1e7f94a3e2e7968 (diff)
downloadscons-git-f74c9aa5b64543ebecce5528ed117a0f5026e4a6.tar.gz
Adjust env.setdefault to be more efficient (review comment)
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Environment.py')
-rw-r--r--SCons/Environment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/SCons/Environment.py b/SCons/Environment.py
index db3427ca1..bb57e37c3 100644
--- a/SCons/Environment.py
+++ b/SCons/Environment.py
@@ -2436,7 +2436,7 @@ class OverrideEnvironment(Base):
def setdefault(self, key, default=None):
"""Emulates the setdefault() method of dictionaries."""
try:
- return self.Dictionary(key)
+ return self.__getitem__(key)
except KeyError:
self.__dict__['overrides'][key] = default
return default