diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-07 12:07:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-11 17:05:50 +0000 |
commit | 1f08fe503b484d4cf5e093f9e3e4c9bbe0be4eda (patch) | |
tree | 8718f515d6c4d45244c490ea9f5e8ccda6b7abf8 | |
parent | 59a3f391ac5ac194f30d11a39676356464269d55 (diff) | |
download | bitbake-1f08fe503b484d4cf5e093f9e3e4c9bbe0be4eda.tar.gz |
bitbake: utils: Avoid traceback errors
Avoid errors like:
ERROR: Exception handler error: 'NoneType' object has no attribute 'decode'
(Bitbake rev: 1aeb45abe56061f044c2347889c191d5256ff21f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | lib/bb/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index 729848a1c..16fc9db25 100644 --- a/lib/bb/utils.py +++ b/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: |