diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-12-22 12:06:54 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-10 13:24:04 +0000 |
commit | a17d271db21b649c3953ca6d39b4ea221224039a (patch) | |
tree | a94e38b319506a966f2738eda1083642b051e55b /bitbake/lib | |
parent | cd382f95461454fecae3d9811a9f2386626e5418 (diff) | |
download | openembedded-core-a17d271db21b649c3953ca6d39b4ea221224039a.tar.gz openembedded-core-a17d271db21b649c3953ca6d39b4ea221224039a.tar.bz2 openembedded-core-a17d271db21b649c3953ca6d39b4ea221224039a.zip |
utils: show the actual exception in better_exec
(Bitbake rev: a148e6a63c842ac586ac1dddbd9008f93cdea297)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/utils.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index a4902931c6..5b3710f84f 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py @@ -344,16 +344,14 @@ def better_exec(code, context, text, realfile = "<code>"): if t in [bb.parse.SkipPackage, bb.build.FuncFailed]: raise - logger.exception("Error executing python function in '%s'", code.co_filename) - - # print the Header of the Error Message - logger.error("There was an error when executing a python function in: %s" % code.co_filename) - logger.error("Exception:%s Message:%s" % (t, value)) + import traceback + exception = traceback.format_exception_only(t, value) + logger.error('Error executing a python function in %s:\n%s', + realfile, ''.join(exception)) # Strip 'us' from the stack (better_exec call) tb = tb.tb_next - import traceback textarray = text.split('\n') linefailed = traceback.tb_lineno(tb) |