diff options
author | Manuel Francisco Naranjo <naranjo.manuel@gmail.com> | 2014-07-21 20:26:40 -0300 |
---|---|---|
committer | Manuel Francisco Naranjo <naranjo.manuel@gmail.com> | 2014-07-21 20:26:40 -0300 |
commit | 7e79d06a91eef25232eb127ab7b071bd4847f48c (patch) | |
tree | 4c9855cf7f88f80052e62540ccea9d70e792d151 | |
parent | dcc55b78f0d62bf6364c4845abc025bb0b8aa942 (diff) | |
download | scons-7e79d06a91eef25232eb127ab7b071bd4847f48c.tar.gz |
Prevent non defined named non defined exception
In a project I'm running I hitted a case where BUILDERS is not part of _dict
which leads to variable builders not defined, making the core of SCons crash
-rw-r--r-- | src/engine/SCons/Environment.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index d178f490..77898551 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -1378,10 +1378,8 @@ class Base(SubstitutionEnvironment): (like a function). There are no references to any mutable objects in the original Environment. """ - try: - builders = self._dict['BUILDERS'] - except KeyError: - pass + + builders = self._dict.get('BUILDERS', {}) clone = copy.copy(self) # BUILDERS is not safe to do a simple copy |