diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-21 15:36:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-21 21:53:52 +0000 |
commit | 59e87e380aa191b5bf256129a9444d6d1741ff67 (patch) | |
tree | 885864849066f0e23b9cb81c982bf12a46b102a0 /bitbake/lib/bb/utils.py | |
parent | 41ae26ecab731f2fb6593df143476c94183be209 (diff) | |
download | poky-59e87e380aa191b5bf256129a9444d6d1741ff67.tar.gz |
bitbake: utils: Ensure shell function failure in python logging is correct
If a python function exec_func() calls a shell task, the logging wasn't working
correctly in all cases since the exception was turned into a BBHandledException()
and the logfile piece was lost which is handled at the top task level.
The easiest way to avoid this is to allow the ExecutionError exceptions to
be raised to a higher level, we don't need the traceback for them.
(Bitbake rev: 7cae11f558f9ff5fd05ef23b789aaef92fb5a327)
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index aa962c4e5d..c07d19cfae 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -402,7 +402,7 @@ def better_exec(code, context, text = None, realfile = "<code>", pythonexception | |||
402 | code = better_compile(code, realfile, realfile) | 402 | code = better_compile(code, realfile, realfile) |
403 | try: | 403 | try: |
404 | exec(code, get_context(), context) | 404 | exec(code, get_context(), context) |
405 | except (bb.BBHandledException, bb.parse.SkipRecipe, bb.data_smart.ExpansionError): | 405 | except (bb.BBHandledException, bb.parse.SkipRecipe, bb.data_smart.ExpansionError, bb.process.ExecutionError): |
406 | # Error already shown so passthrough, no need for traceback | 406 | # Error already shown so passthrough, no need for traceback |
407 | raise | 407 | raise |
408 | except Exception as e: | 408 | except Exception as e: |