[oe-commits] [bitbake] 04/05: utils: Avoid traceback errors

git at git.openembedded.org git at git.openembedded.org
Wed Dec 7 12:25:48 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 1aeb45abe56061f044c2347889c191d5256ff21f
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Dec 7 12:07:06 2016 +0000

    utils: Avoid traceback errors
    
    Avoid errors like:
    
    ERROR: Exception handler error: 'NoneType' object has no attribute 'decode'
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index c4b25b5..9073f15 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:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list