From: Richard Purdie Date: Wed, 7 Dec 2016 12:07:06 +0000 (+0000) Subject: bitbake: bitbake: utils: Avoid traceback errors X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a411abf823a2c23f228cb7355ae9311590de952e;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: bitbake: utils: Avoid traceback errors Avoid errors like: ERROR: Exception handler error: 'NoneType' object has no attribute 'decode' (Bitbake rev: 1aeb45abe56061f044c2347889c191d5256ff21f) (Bitbake rev: 1f08fe503b484d4cf5e093f9e3e4c9bbe0be4eda) Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 729848a1cc2..16fc9db2575 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py @@ -378,7 +378,7 @@ def _print_exception(t, value, tb, realfile, text, context): # If the exception is from spwaning a task, let's be helpful and display # the output (which hopefully includes stderr). - if isinstance(value, subprocess.CalledProcessError): + if isinstance(value, subprocess.CalledProcessError) and value.output: error.append("Subprocess output:") error.append(value.output.decode("utf-8", errors="ignore")) finally: