aboutsummaryrefslogtreecommitdiffstats
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:12 +0000
commit23a6f11b089b14382c21d431edf34fa7224c66bf (patch)
treebbc430cc103689063d9bd6fef05e52eaa7ecd7d7
parentb562966435ccd2335cfdccf89a9d7d18dd76a749 (diff)
downloadbitbake-23a6f11b089b14382c21d431edf34fa7224c66bf.tar.gz
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. 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--lib/bb/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index 1a5158970..cd442dcd0 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -401,7 +401,7 @@ def better_exec(code, context, text = None, realfile = "<code>", 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: