summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cookerdata.py
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2015-07-31 11:16:45 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 22:24:19 +0100
commit75fc6bf0a02dd0512a958cf0c1461f4e98796736 (patch)
tree2d7d988abf8eca6dc0bc57c093fd5f144d186c4d /bitbake/lib/bb/cookerdata.py
parentd2bf05fb55619e9bf43292a3b13ed7d802fc64bc (diff)
downloadopenembedded-core-contrib-75fc6bf0a02dd0512a958cf0c1461f4e98796736.tar.gz
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 <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cookerdata.py')
-rw-r--r--bitbake/lib/bb/cookerdata.py7
1 files 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