diff options
author | Christopher Larson <chris_larson@mentor.com> | 2015-07-31 11:16:45 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-01 22:24:19 +0100 |
commit | 75fc6bf0a02dd0512a958cf0c1461f4e98796736 (patch) | |
tree | 2d7d988abf8eca6dc0bc57c093fd5f144d186c4d /bitbake | |
parent | d2bf05fb55619e9bf43292a3b13ed7d802fc64bc (diff) | |
download | poky-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')
-rw-r--r-- | bitbake/lib/bb/cookerdata.py | 7 |
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): | |||
173 | def wrapped(fn, *args): | 173 | def wrapped(fn, *args): |
174 | try: | 174 | try: |
175 | return func(fn, *args) | 175 | return func(fn, *args) |
176 | except (IOError, bb.parse.ParseError, bb.data_smart.ExpansionError) as exc: | 176 | except IOError as exc: |
177 | import traceback | 177 | import traceback |
178 | parselog.critical( traceback.format_exc()) | 178 | parselog.critical(traceback.format_exc()) |
179 | parselog.critical("Unable to parse %s: %s" % (fn, exc)) | ||
180 | sys.exit(1) | ||
181 | except (bb.parse.ParseError, bb.data_smart.ExpansionError) as exc: | ||
179 | parselog.critical("Unable to parse %s: %s" % (fn, exc)) | 182 | parselog.critical("Unable to parse %s: %s" % (fn, exc)) |
180 | sys.exit(1) | 183 | sys.exit(1) |
181 | return wrapped | 184 | return wrapped |