diff options
-rw-r--r-- | lib/bb/cooker.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 06912bde6..95b5db91f 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -33,7 +33,7 @@ import threading from cStringIO import StringIO from contextlib import closing from functools import wraps -import bb +import bb, bb.exceptions from bb import utils, data, parse, event, cache, providers, taskdata, command, runqueue logger = logging.getLogger("BitBake") @@ -1019,8 +1019,7 @@ class ParsingFailure(Exception): def __init__(self, realexception, recipe): self.realexception = realexception self.recipe = recipe - Exception.__init__(self, "Failure when parsing %s" % recipe) - self.args = (realexception, recipe) + Exception.__init__(self, realexception, recipe) def parse_file(task): filename, appends = task @@ -1116,6 +1115,10 @@ class CookerParser(object): except StopIteration: self.shutdown() return False + except ParsingFailure as exc: + self.shutdown(clean=False) + bb.fatal('Error parsing %s: %s' % + (exc.recipe, bb.exceptions.to_string(exc.realexception))) except Exception as exc: self.shutdown(clean=False) bb.fatal('Error parsing %s: %s' % (exc.recipe, exc)) |