diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-12-15 22:07:38 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-12-15 22:09:42 -0700 |
commit | 1f5d49ce64e5e1c7705edbfa3c8e19649c21edd2 (patch) | |
tree | caff35d732f1c8b59f7e9043d70e78ff4cd3f27a | |
parent | 4e25db1f8266279ad4a2967676dbd33068932fb7 (diff) | |
download | bitbake-1f5d49ce64e5e1c7705edbfa3c8e19649c21edd2.tar.gz |
cooker: don't swallow recipe parse errors
Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r-- | lib/bb/cooker.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 80af65001..c098d9828 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -933,7 +933,11 @@ class CookerExit(bb.event.Event): def parse_file(task): filename, appends = task - return True, bb.cache.Cache.parse(filename, appends, parse_file.cfg) + try: + return True, bb.cache.Cache.parse(filename, appends, parse_file.cfg) + except Exception, exc: + exc.recipe = filename + raise exc class CookerParser(object): def __init__(self, cooker, filelist, masked): @@ -1013,7 +1017,7 @@ class CookerParser(object): raise except Exception as exc: self.shutdown(clean=False) - sys.exit(1) + bb.fatal('Error parsing %s: %s' % (exc.recipe, exc)) self.current += 1 self.virtuals += len(result) |