[bitbake-devel] [PATCH 3/5] cooker: report recipe being parsed when ExpansionError occurs
Paul Eggleton
paul.eggleton at linux.intel.com
Wed May 30 16:17:16 UTC 2012
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 at linux.intel.com>
---
bitbake/lib/bb/cooker.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index b30945c..928b600 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/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)
--
1.7.9.5
More information about the bitbake-devel
mailing list