From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BD6FB13888F for ; Mon, 12 Oct 2015 04:36:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 46C4F21C003; Mon, 12 Oct 2015 04:36:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 71F2AE086C for ; Mon, 12 Oct 2015 04:36:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 8E16C33D3D0 for ; Mon, 12 Oct 2015 04:36:07 +0000 (UTC) From: Mike Frysinger To: gentoo-catalyst@lists.gentoo.org Subject: [gentoo-catalyst] [PATCH 7/9] hash_utils: decode output of popen Date: Mon, 12 Oct 2015 00:36:00 -0400 Message-Id: <1444624562-26162-7-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1444624562-26162-1-git-send-email-vapier@gentoo.org> References: <1444624562-26162-1-git-send-email-vapier@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Archives-Salt: d49cc77b-44cf-474e-b4cb-97e52afd84d6 X-Archives-Hash: d9e41c51cb70aac8148e8c862ac706ce In py3, the return of popen is binary data. We need to decode it to get a string we can work with. --- catalyst/hash_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalyst/hash_utils.py b/catalyst/hash_utils.py index 1161da3..6e08967 100644 --- a/catalyst/hash_utils.py +++ b/catalyst/hash_utils.py @@ -117,7 +117,7 @@ class HashMap(object): log.debug('args = %r', args) source = Popen(args, stdout=PIPE) output = source.communicate() - lines = output[0].split('\n') + lines = output[0].decode('ascii').split('\n') log.debug('output = %s', output) header = lines[0] h_f = lines[1].split() -- 2.5.2