mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
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>
This commit is contained in:
@@ -402,7 +402,7 @@ def better_exec(code, context, text = None, realfile = "<code>", pythonexception
|
|||||||
code = better_compile(code, realfile, realfile)
|
code = better_compile(code, realfile, realfile)
|
||||||
try:
|
try:
|
||||||
exec(code, get_context(), context)
|
exec(code, get_context(), context)
|
||||||
except (bb.BBHandledException, bb.parse.SkipRecipe, bb.data_smart.ExpansionError):
|
except (bb.BBHandledException, bb.parse.SkipRecipe, bb.data_smart.ExpansionError, bb.process.ExecutionError):
|
||||||
# Error already shown so passthrough, no need for traceback
|
# Error already shown so passthrough, no need for traceback
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user