From patchwork Tue Dec 5 17:53:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 120727 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6049428qgn; Tue, 5 Dec 2017 09:53:58 -0800 (PST) X-Google-Smtp-Source: AGs4zMa7J58at9+gpqdsb98cD8NqIJblPtDtVv8e1eAVE/hBTtV0N7xIf2gERSENRb8y6nR+sM70 X-Received: by 10.99.126.6 with SMTP id z6mr18052304pgc.126.1512496438019; Tue, 05 Dec 2017 09:53:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512496438; cv=none; d=google.com; s=arc-20160816; b=I8j950aWUIwfpFBWFlBvwHVbL0/YIMeOUFAOmNdPQZlZUwfbnD104ODS0qGTC8AySu s6eV4itPYNIY/e1+FlLlzgyQhRwgR58VeXoDxsnljmQF31B0t+VsOu2Ub0Zefwehk8+L SXKDm5SukFaDI9Rm++xaNo6TLZiK5q2jir9A6nu1thHoSLENUIXCiTBqMSyi/pgpbHbv eLbpweiqhV/oyrs/gsYRnzqnnz9jjmH/ddw+96gqX64zZT1XM9NvbWOiA99gqdudEvmW dnSBTqDCnPuJZElswwqdEcOaPR7UamQmqAnGpahe6IJLvJ2jUzbw9qM8kjhymtK+TAyl tQzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=KV51DVmbi1L4j8obqk/T8TU8Kx9ejJQuMCA/dnh1KqE=; b=wyR8atJKr/Kw+9dgoAWz/deW0nGjFbC6IUfbHFQbplkv2ks9fTJWJ8JU5hOwRVtUCx wdtsdJ4v/kYjIx/UVciqWNJzCOv/QOYqPq33zEIeOFJyatnqJoGJBVV4yOwLKpp/vAT2 V4KSc/pTMSLWPWID/SWNasd3N50AVLsIZOWAM3cx/7eFUveyLD8vrmWv82VWIaVJmWY1 Jby9ka9KiIvg81d3qLU8vomXfyXVA/Ai9TwXEijgzdKSFqcK8FSXOv5r5dCJue2Qo+XK NEkV2T5dx60tPo2nYWRTJLoKWGCONXMRmmFvdA78EzjZIgkYddF/wWNhKrVGUlq7sF06 XOqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=nJf0MGJ2; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id g3si385393pgc.280.2017.12.05.09.53.57; Tue, 05 Dec 2017 09:53:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=nJf0MGJ2; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 24AA578674; Tue, 5 Dec 2017 17:53:55 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by mail.openembedded.org (Postfix) with ESMTP id 0F5C2783AE for ; Tue, 5 Dec 2017 17:53:53 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id 64so2811557wme.3 for ; Tue, 05 Dec 2017 09:53:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=zl9zSNLeT4jqydc7kLBSAAKpzAw3Pg4XLtgbxEHXMo4=; b=nJf0MGJ2Oqg1+jCS2TDhnKO1eYeLoRmdUCz2WxJQfePxmj55OGKrQ7YCYM0cPlKOHX ytsufL0Q3j7OeSeoPSfceWNGZfcMcxJ5mKucdh9ACP0ahqvWljJnqLqBarojJeLV9P1m 3LnYlt5Wrn3OQC3srk4h3SxC6QPfv/8keHiDs1xUWQMDBIpux650gAST1yKQbG3wP57w oGe0yOCxBCOnqPpCB4aRxfjMm+LI0ZlzmRBxKq78vMBE8JNppqwV7Y6nqPNLS804WEfS lzG3IHc3lScl50vlvVmgCXbbydv7L6Zngk6khAYU87sHbcq6ahngLRVwe0wne/VW2Xd1 yg2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=zl9zSNLeT4jqydc7kLBSAAKpzAw3Pg4XLtgbxEHXMo4=; b=AB93M4M6IHwLV9T0bdws/jr/LgynnJYDZbsG0SaeQT6+82gwviAsqJ63XpS9HxJMNS qUFAkxU0EuVD4NLGTCVJFbO0dFOISXNq+mbHgWYcPAQBDZ1TgH+C/kTyePCAD6XZp/pu Bb5MLGmsmSXZqFwTfZsBgEND8sgnjRsXoaNTyxC6qyllb6rvxaTNvjsKsoB12bj93Q6E 6oS/hJq1BSgSHO9iCWRB6j0gD7X9tbB9gW2ad9V7CJwe/oFPRj0NrB6XHWnYG2rk6/4S fnb4N4nurXKU1fyvHuT/oc2JX40i0wMJBpWB/G8tLp2vdUkgBVv8YQFlNzDXOh+flnCX wfog== X-Gm-Message-State: AKGB3mJev5gTmz85vsZGTfLjYQ1M1d+M7nGTqgyh8TVcWrQlaea/TEDP Y+soR9PVkGFeiyvgJmgf3pv2fC3n X-Received: by 10.28.94.75 with SMTP id s72mr11160851wmb.112.1512496434351; Tue, 05 Dec 2017 09:53:54 -0800 (PST) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id 138sm1128291wmf.21.2017.12.05.09.53.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 09:53:53 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Tue, 5 Dec 2017 17:53:50 +0000 Message-Id: <20171205175351.4499-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH 1/2] sanity: getstatusoutput returns an int, not a string X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This code is an error path so nobody noticed that oe.utils.getstatusoutput() is just a wrapper around subprocess.getstatusoutput() which returns an (int, string) pair not (string, string). Signed-off-by: Ross Burton --- meta/classes/sanity.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 1feb7949daa..1410af29017 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -462,7 +462,7 @@ def check_make_version(sanity_data): from distutils.version import LooseVersion status, result = oe.utils.getstatusoutput("make --version") if status != 0: - return "Unable to execute make --version, exit code %s\n" % status + return "Unable to execute make --version, exit code %d\n" % status version = result.split()[2] if LooseVersion(version) == LooseVersion("3.82"): # Construct a test file @@ -498,7 +498,7 @@ def check_tar_version(sanity_data): from distutils.version import LooseVersion status, result = oe.utils.getstatusoutput("tar --version") if status != 0: - return "Unable to execute tar --version, exit code %s\n" % status + return "Unable to execute tar --version, exit code %d\n" % status version = result.split()[3] if LooseVersion(version) < LooseVersion("1.24"): return "Your version of tar is older than 1.24 and has bugs which will break builds. Please install a newer version of tar.\n" @@ -511,7 +511,7 @@ def check_git_version(sanity_data): from distutils.version import LooseVersion status, result = oe.utils.getstatusoutput("git --version 2> /dev/null") if status != 0: - return "Unable to execute git --version, exit code %s\n" % status + return "Unable to execute git --version, exit code %d\n" % status version = result.split()[2] if LooseVersion(version) < LooseVersion("1.8.3.1"): return "Your version of git is older than 1.8.3.1 and has bugs which will break builds. Please install a newer version of git.\n"