summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-14 10:13:56 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-14 13:33:35 +0000
commitb0f3d3b3655fa7ef0f349318a50f7947cb40c26c (patch)
tree9f8c5a19703877ad287403b6452c075bad68b211
parent2b6574e7c4341c7e999c113e4ee7b9201b56910f (diff)
downloadpoky-b0f3d3b3655fa7ef0f349318a50f7947cb40c26c.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: 23a6f11b089b14382c21d431edf34fa7224c66bf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7cae11f558f9ff5fd05ef23b789aaef92fb5a327) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/utils.py2
1 files changed, 1 insertions, 1 deletions
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 = "<code>", pythonexception
401 code = better_compile(code, realfile, realfile) 401 code = better_compile(code, realfile, realfile)
402 try: 402 try:
403 exec(code, get_context(), context) 403 exec(code, get_context(), context)
404 except (bb.BBHandledException, bb.parse.SkipRecipe, bb.data_smart.ExpansionError): 404 except (bb.BBHandledException, bb.parse.SkipRecipe, bb.data_smart.ExpansionError, bb.process.ExecutionError):
405 # Error already shown so passthrough, no need for traceback 405 # Error already shown so passthrough, no need for traceback
406 raise 406 raise
407 except Exception as e: 407 except Exception as e: