From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 814FE138350 for ; Fri, 14 Feb 2020 18:13:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68973E08AE; Fri, 14 Feb 2020 18:13:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 49A03E08AE for ; Fri, 14 Feb 2020 18:13:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BE6E534EDA1 for ; Fri, 14 Feb 2020 18:13:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 48A50AF for ; Fri, 14 Feb 2020 18:13:13 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1581703783.c6d2400dccc2b5334bfab5f82f1a8bf1ab38f06c.zmedico@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/revdep_rebuild/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/revdep_rebuild/stuff.py X-VCS-Directories: pym/gentoolkit/revdep_rebuild/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c6d2400dccc2b5334bfab5f82f1a8bf1ab38f06c X-VCS-Branch: master Date: Fri, 14 Feb 2020 18:13:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 72a0b68f-8e1c-4319-8808-c66ecbec5167 X-Archives-Hash: 39f778840f46c4726c19df2e9bd63e5e commit: c6d2400dccc2b5334bfab5f82f1a8bf1ab38f06c Author: Zac Medico gentoo org> AuthorDate: Fri Feb 14 18:04:53 2020 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Feb 14 18:09:43 2020 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=c6d2400d revdep-rebuild: encode Popen args as utf-8 bytes (bug 709610) Prevent this Popen exception: UnicodeEncodeError: 'ascii' codec can't encode character '\xe8' in position 20: ordinal not in range(128) Bug: https://bugs.gentoo.org/709610#c0 Signed-off-by: Zac Medico gentoo.org> pym/gentoolkit/revdep_rebuild/stuff.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pym/gentoolkit/revdep_rebuild/stuff.py b/pym/gentoolkit/revdep_rebuild/stuff.py index 3b0a980..002eb4b 100644 --- a/pym/gentoolkit/revdep_rebuild/stuff.py +++ b/pym/gentoolkit/revdep_rebuild/stuff.py @@ -19,6 +19,7 @@ def call_program(args): @param, args: arument list to pass to subprocess @return str ''' + args = [arg if isinstance(arg, bytes) else arg.encode('utf-8') for arg in args] subp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = subp.communicate() stdout = stdout.decode('utf-8')