diff options
Diffstat (limited to 'bitbake/lib/bb/utils.py')
| -rw-r--r-- | bitbake/lib/bb/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 7ab8927608..e9ad68f2d7 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
| @@ -372,7 +372,7 @@ def _print_exception(t, value, tb, realfile, text, context): | |||
| 372 | finally: | 372 | finally: |
| 373 | logger.error("\n".join(error)) | 373 | logger.error("\n".join(error)) |
| 374 | 374 | ||
| 375 | def better_exec(code, context, text = None, realfile = "<code>"): | 375 | def better_exec(code, context, text = None, realfile = "<code>", pythonexception=False): |
| 376 | """ | 376 | """ |
| 377 | Similiar to better_compile, better_exec will | 377 | Similiar to better_compile, better_exec will |
| 378 | print the lines that are responsible for the | 378 | print the lines that are responsible for the |
| @@ -389,6 +389,8 @@ def better_exec(code, context, text = None, realfile = "<code>"): | |||
| 389 | # Error already shown so passthrough, no need for traceback | 389 | # Error already shown so passthrough, no need for traceback |
| 390 | raise | 390 | raise |
| 391 | except Exception as e: | 391 | except Exception as e: |
| 392 | if pythonexception: | ||
| 393 | raise | ||
| 392 | (t, value, tb) = sys.exc_info() | 394 | (t, value, tb) = sys.exc_info() |
| 393 | try: | 395 | try: |
| 394 | _print_exception(t, value, tb, realfile, text, context) | 396 | _print_exception(t, value, tb, realfile, text, context) |
