Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6918C433F5 for ; Wed, 3 Nov 2021 21:15:48 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 996C860E78 for ; Wed, 3 Nov 2021 21:15:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 996C860E78 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=korsgaard.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=buildroot.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6C48D60AD2; Wed, 3 Nov 2021 21:15:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FhERcVQRcgRQ; Wed, 3 Nov 2021 21:15:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id CBA8460730; Wed, 3 Nov 2021 21:15:46 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id A49C81BF38A for ; Wed, 3 Nov 2021 21:15:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 93D5F60730 for ; Wed, 3 Nov 2021 21:15:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2qodSdHCogG7 for ; Wed, 3 Nov 2021 21:15:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by smtp3.osuosl.org (Postfix) with ESMTPS id A9BF5606B3 for ; Wed, 3 Nov 2021 21:15:44 +0000 (UTC) Received: (Authenticated sender: peter@korsgaard.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id B8EAD20008; Wed, 3 Nov 2021 21:15:42 +0000 (UTC) Received: from peko by dell.be.48ers.dk with local (Exim 4.92) (envelope-from ) id 1miNbi-00060O-4P; Wed, 03 Nov 2021 22:15:42 +0100 From: Peter Korsgaard To: Thomas Petazzoni References: <20211102222035.719508-1-thomas.petazzoni@bootlin.com> Date: Wed, 03 Nov 2021 22:15:42 +0100 In-Reply-To: <20211102222035.719508-1-thomas.petazzoni@bootlin.com> (Thomas Petazzoni's message of "Tue, 2 Nov 2021 23:20:33 +0100") Message-ID: <87k0hpkkjl.fsf@dell.be.48ers.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Subject: Re: [Buildroot] [PATCH 1/2] utils/getdeveloperlib.py: fix check_output() return value decoding X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: buildroot@buildroot.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" >>>>> "Thomas" == Thomas Petazzoni writes: > In Python 3.x, check_output() returns a "bytes" array, and not a > string. Its result needs to be decoded to be turned into a > string. Without this fix, "get-developers -c" bails out with: > Traceback (most recent call last): > File "/home/thomas/projets/buildroot/./utils/get-developers", line 105, in > __main__() > File "/home/thomas/projets/buildroot/./utils/get-developers", line 53, in __main__ > files = getdeveloperlib.check_developers(devs) > File "/home/thomas/projets/buildroot/utils/getdeveloperlib.py", line 280, in check_developers > files = subprocess.check_output(cmd).strip().split("\n") > TypeError: a bytes-like object is required, not 'str' > Signed-off-by: Thomas Petazzoni Alternatively we could use universal_newlines=True, but Ok - Committed to 2021.02.x and 2021.08.x, thanks. -- Bye, Peter Korsgaard _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot