Gary Oberbrunner committed 537aafc

Fix problem with re-raising old exception when CPPDEFINES contains a None or invalid element

  • Participants
  • Parent commits 1031000

Comments (0)

Files changed (1)

File src/engine/SCons/

     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]))
             elif SCons.Util.is_String(d):
-                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