summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-07 12:07:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-11 17:21:46 +0000
commita411abf823a2c23f228cb7355ae9311590de952e (patch)
treee38f817fb35dd0ad0ef5f6f41d7da7cc0354af8d
parent6a3f93a3778a5d72e6895526e6f7ec836f9e3fc4 (diff)
downloadopenembedded-core-contrib-a411abf823a2c23f228cb7355ae9311590de952e.tar.gz
openembedded-core-contrib-a411abf823a2c23f228cb7355ae9311590de952e.tar.bz2
openembedded-core-contrib-a411abf823a2c23f228cb7355ae9311590de952e.zip
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 <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.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 729848a1cc..16fc9db257 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: