]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: handle ExpansionError the same way we do ParseError
authorChris Larson <chris_larson@mentor.com>
Thu, 2 Jun 2011 21:45:13 +0000 (14:45 -0700)
committerChris Larson <chris_larson@mentor.com>
Thu, 2 Jun 2011 21:45:13 +0000 (14:45 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/cooker.py

index db60095689724c9f2b770ec42ed47922fdeb076d..548d0a7b1d0b22e048f5d4e02b0fd3a714bef551 100644 (file)
@@ -1032,7 +1032,7 @@ def catch_parse_error(func):
     def wrapped(fn, *args):
         try:
             return func(fn, *args)
-        except (IOError, bb.parse.ParseError) as exc:
+        except (IOError, bb.parse.ParseError, bb.data_smart.ExpansionError) as exc:
             parselog.critical("Unable to parse %s: %s" % (fn, exc))
             sys.exit(1)
     return wrapped
@@ -1151,7 +1151,7 @@ class CookerParser(object):
             self.shutdown(clean=False)
             bb.fatal('Unable to parse %s: %s' %
                      (exc.recipe, bb.exceptions.to_string(exc.realexception)))
-        except bb.parse.ParseError as exc:
+        except (bb.parse.ParseError, bb.data_smart.ExpansionError) as exc:
             bb.fatal(str(exc))
         except SyntaxError as exc:
             logger.error('Unable to parse %s', exc.recipe)