From 75fc6bf0a02dd0512a958cf0c1461f4e98796736 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Fri, 31 Jul 2015 11:16:45 -0700 Subject: bitbake: bb.cookerdata: don't show traceback for ParseError/ExpansionError Tracebacks are of extremely limited usefulness in this context. The exceptions carry the necessary context already, and the user doesn't care about the calls in bitbake internals that led to an expansion or parse failure. (Bitbake rev: 9b95fa94eaae452ac7814f1e67c2f7a6314c52f1) Signed-off-by: Christopher Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/cookerdata.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 0ca87a094e..57fc6bb50e 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py @@ -173,9 +173,12 @@ def catch_parse_error(func): def wrapped(fn, *args): try: return func(fn, *args) - except (IOError, bb.parse.ParseError, bb.data_smart.ExpansionError) as exc: + except IOError as exc: import traceback - parselog.critical( traceback.format_exc()) + parselog.critical(traceback.format_exc()) + parselog.critical("Unable to parse %s: %s" % (fn, exc)) + sys.exit(1) + except (bb.parse.ParseError, bb.data_smart.ExpansionError) as exc: parselog.critical("Unable to parse %s: %s" % (fn, exc)) sys.exit(1) return wrapped -- cgit v1.2.3-54-g00ecf