diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2010-11-04 00:42:08 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2010-11-04 00:42:08 (GMT) |
commit | 9de4764cf8bdfb9da9565e3c38878eb1c1b03377 (patch) | |
tree | a40bebd7a714d74f8daf3eb1e1210e2f43cec063 /src | |
parent | 94f7047378a9d8141f83a1819c81a26c6a3178c5 (diff) | |
download | SCons-9de4764cf8bdfb9da9565e3c38878eb1c1b03377.zip SCons-9de4764cf8bdfb9da9565e3c38878eb1c1b03377.tar.gz SCons-9de4764cf8bdfb9da9565e3c38878eb1c1b03377.tar.bz2 |
Fix problem with re-raising old exception when CPPDEFINES contains a None or invalid element
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/SCons/Defaults.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py index dbefcbf..bbc2571 100644 --- a/src/engine/SCons/Defaults.py +++ b/src/engine/SCons/Defaults.py @@ -372,7 +372,9 @@ def processDefines(defs): if SCons.Util.is_List(defs): l = [] for d in defs: - if SCons.Util.is_List(d) or isinstance(d, tuple): + if d is None: + continue + elif SCons.Util.is_List(d) or isinstance(d, tuple): if len(d) >= 2: l.append(str(d[0]) + '=' + str(d[1])) else: @@ -386,7 +388,7 @@ def processDefines(defs): elif SCons.Util.is_String(d): l.append(str(d)) else: - raise + raise SCons.Errors.UserError("DEFINE %s is not a list, dict, string or None."%repr(d)) elif SCons.Util.is_Dict(defs): # The items in a dictionary are stored in random order, but # if the order of the command-line options changes from |