summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-07-18 17:22:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-29 09:53:32 +0100
commitea234239f41a94a4b13b68648d8dc611f793a441 (patch)
treeeef70153531fe300768cdb64a3dbf499e2ce3d7e /bitbake/lib/bb/utils.py
parentc42b5333f0261daa749306471c294c13dc33968a (diff)
downloadpoky-ea234239f41a94a4b13b68648d8dc611f793a441.tar.gz
bitbake: lib/bb/utils: show subprocess output in stack traces
If better_exec() throws a subprocess.CalledProcessError then show the output to the user as it likely contains useful information for solving the problem. (Bitbake rev: 8a6424ed871c3cbacd21cae8bc801197f83d67a6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 995089a384..ce52960b43 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -375,6 +375,12 @@ def _print_exception(t, value, tb, realfile, text, context):
375 level = level + 1 375 level = level + 1
376 376
377 error.append("Exception: %s" % ''.join(exception)) 377 error.append("Exception: %s" % ''.join(exception))
378
379 # If the exception is from spwaning a task, let's be helpful and display
380 # the output (which hopefully includes stderr).
381 if isinstance(value, subprocess.CalledProcessError):
382 error.append("Subprocess output:")
383 error.append(value.output.decode("utf-8", errors="ignore"))
378 finally: 384 finally:
379 logger.error("\n".join(error)) 385 logger.error("\n".join(error))
380 386