From b0f3d3b3655fa7ef0f349318a50f7947cb40c26c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 14 Mar 2022 10:13:56 +0800 Subject: 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: 23a6f11b089b14382c21d431edf34fa7224c66bf) Signed-off-by: Richard Purdie (cherry picked from commit 7cae11f558f9ff5fd05ef23b789aaef92fb5a327) Signed-off-by: Anuj Mittal Signed-off-by: Richard Purdie --- bitbake/lib/bb/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 1a51589704..cd442dcd0d 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py @@ -401,7 +401,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: -- cgit v1.2.3-54-g00ecf