summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Francisco Naranjo <naranjo.manuel@gmail.com>2014-07-21 23:26:40 (GMT)
committerManuel Francisco Naranjo <naranjo.manuel@gmail.com>2014-07-21 23:26:40 (GMT)
commitc83fbe751e3a3d0f8e44eb97f9584f518b3a2b66 (patch)
tree4c9855cf7f88f80052e62540ccea9d70e792d151
parent23123e60138a162556cdbb54c3c347f7553342ab (diff)
downloadSCons-c83fbe751e3a3d0f8e44eb97f9584f518b3a2b66.zip
SCons-c83fbe751e3a3d0f8e44eb97f9584f518b3a2b66.tar.gz
SCons-c83fbe751e3a3d0f8e44eb97f9584f518b3a2b66.tar.bz2
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.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index d178f49..7789855 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