From 59e87e380aa191b5bf256129a9444d6d1741ff67 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 21 Feb 2022 15:36:11 +0000 Subject: [PATCH] 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 --- bitbake/lib/bb/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = "", pythonexception code = better_compile(code, realfile, realfile) try: 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 raise except Exception as e: