diff options
| -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 | ||
