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/bb/utils.py | |
| parent | cd382f95461454fecae3d9811a9f2386626e5418 (diff) | |
| download | poky-a17d271db21b649c3953ca6d39b4ea221224039a.tar.gz | |
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/bb/utils.py')
| -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>"): | |||
| 344 | if t in [bb.parse.SkipPackage, bb.build.FuncFailed]: | 344 | if t in [bb.parse.SkipPackage, bb.build.FuncFailed]: |
| 345 | raise | 345 | raise |
| 346 | 346 | ||
| 347 | logger.exception("Error executing python function in '%s'", code.co_filename) | 347 | import traceback |
| 348 | 348 | exception = traceback.format_exception_only(t, value) | |
| 349 | # print the Header of the Error Message | 349 | logger.error('Error executing a python function in %s:\n%s', |
| 350 | logger.error("There was an error when executing a python function in: %s" % code.co_filename) | 350 | realfile, ''.join(exception)) |
| 351 | logger.error("Exception:%s Message:%s" % (t, value)) | ||
| 352 | 351 | ||
| 353 | # Strip 'us' from the stack (better_exec call) | 352 | # Strip 'us' from the stack (better_exec call) |
| 354 | tb = tb.tb_next | 353 | tb = tb.tb_next |
| 355 | 354 | ||
| 356 | import traceback | ||
| 357 | textarray = text.split('\n') | 355 | textarray = text.split('\n') |
| 358 | linefailed = traceback.tb_lineno(tb) | 356 | linefailed = traceback.tb_lineno(tb) |
| 359 | 357 | ||
