]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: bitbake: utils: Avoid traceback errors
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 7 Dec 2016 12:07:06 +0000 (12:07 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Jan 2017 17:21:46 +0000 (17:21 +0000)
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>
bitbake/lib/bb/utils.py

index 729848a1cc2ab046b0a7e5ae4ca69247fdedec52..16fc9db2575f58130be3281bb1552329a085652d 100644 (file)
@@ -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: