Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id EE4C060806 for ; Wed, 7 Dec 2016 12:07:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id uB7C7EAT006638; Wed, 7 Dec 2016 12:07:14 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rQjIN0Eghr5i; Wed, 7 Dec 2016 12:07:14 +0000 (GMT) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id uB7C79Z8006634 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 7 Dec 2016 12:07:10 GMT Received: from richard by hex with local (Exim 4.86_2) (envelope-from ) id 1cEb09-0008P9-9E; Wed, 07 Dec 2016 12:07:09 +0000 From: Richard Purdie To: bitbake-devel@lists.openembedded.org Date: Wed, 7 Dec 2016 12:07:06 +0000 Message-Id: <1481112426-32269-1-git-send-email-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.7.4 Subject: [PATCH] utils: Avoid traceback errors X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2016 12:07:15 -0000 Avoid errors like: ERROR: Exception handler error: 'NoneType' object has no attribute 'decode' Signed-off-by: Richard Purdie --- bitbake/lib/bb/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index c4b25b5..9073f15 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: -- 2.7.4