diff options
author | Mats Wichmann <mats@linux.com> | 2020-07-31 16:12:09 -0600 |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2020-07-31 16:12:09 -0600 |
commit | f74c9aa5b64543ebecce5528ed117a0f5026e4a6 (patch) | |
tree | 5c41c58a1d1f68b342915008c451ce09d06f9fc8 /SCons | |
parent | 2f85d806945f81e5dae1cf1bc1e7f94a3e2e7968 (diff) | |
download | scons-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')
-rw-r--r-- | SCons/Environment.py | 2 |
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 |