diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-05-30 17:17:16 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 17:21:29 +0100 |
commit | a2a8e8c9f5a1a30aacab696fd2b434939ee2c4e2 (patch) | |
tree | ca48439e8ea11e73a46d15919112a98305b94c9e /lib/bb/cooker.py | |
parent | 1ae0181ba49ccfcb2d889de5dd1d8912b9e49157 (diff) | |
download | bitbake-a2a8e8c9f5a1a30aacab696fd2b434939ee2c4e2.tar.gz |
cooker: report recipe being parsed when ExpansionError occurs
When an ExpansionError occurs during parsing it is useful to know which
recipe was being parsed when it occurred.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r-- | lib/bb/cooker.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index b30945c4b..928b6009a 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -1657,9 +1657,13 @@ class CookerParser(object): logger.error('Unable to parse %s: %s' % (exc.recipe, bb.exceptions.to_string(exc.realexception))) self.shutdown(clean=False) - except (bb.parse.ParseError, bb.data_smart.ExpansionError) as exc: + except bb.parse.ParseError as exc: logger.error(str(exc)) self.shutdown(clean=False) + except bb.data_smart.ExpansionError as exc: + _, value, _ = sys.exc_info() + logger.error('ExpansionError during parsing %s: %s', value.recipe, str(exc)) + self.shutdown(clean=False) except SyntaxError as exc: logger.error('Unable to parse %s', exc.recipe) self.shutdown(clean=False) |