utils: Avoid traceback errors
PATCH 1/1 utils: Avoid traceback errors
Avoid errors like:
ERROR: Exception handler error: 'NoneType' object has no attribute 'decode'
Signed-off-by Richard Purdie <[email protected]>
--- bitbake/lib/bb/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/utils.py +1 -1
@@ -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:
Signature · 1 line
2.7.4