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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8CF67158094 for ; Wed, 21 Sep 2022 08:28:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D9F13E0C62; Wed, 21 Sep 2022 08:28:39 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C2245E0C62 for ; Wed, 21 Sep 2022 08:28:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DF7D03409C8 for ; Wed, 21 Sep 2022 08:28:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 84AF75B1 for ; Wed, 21 Sep 2022 08:28:37 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1663748935.a94b2f664714a33eeeb492efe87525fa9947a644.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: lddtree.py X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: a94b2f664714a33eeeb492efe87525fa9947a644 X-VCS-Branch: master Date: Wed, 21 Sep 2022 08:28:37 +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: 396eb786-8570-4011-8707-c7530a639143 X-Archives-Hash: 03a465e92757b84eff0994ec0033caf8 commit: a94b2f664714a33eeeb492efe87525fa9947a644 Author: Mike Frysinger gentoo org> AuthorDate: Wed Sep 21 08:28:55 2022 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Wed Sep 21 08:28:55 2022 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=a94b2f66 lddtree: specify utf-8 encoding with text files Signed-off-by: Mike Frysinger gentoo.org> lddtree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lddtree.py b/lddtree.py index 1f66b4d..3c9d66f 100755 --- a/lddtree.py +++ b/lddtree.py @@ -184,7 +184,7 @@ exec \\ """ wrappath = root + path os.rename(wrappath, wrappath + '.elf') - with open(wrappath, 'w') as f: + with open(wrappath, 'w', encoding='utf-8') as f: f.write(wrapper % replacements) os.chmod(wrappath, 0o0755) @@ -251,7 +251,7 @@ def ParseLdSoConf(ldso_conf, root='/', debug=False, _first=True): dbg_pfx = '' if _first else ' ' try: dbg(debug, '%sParseLdSoConf(%s)' % (dbg_pfx, ldso_conf)) - with open(ldso_conf) as f: + with open(ldso_conf, encoding='utf-8') as f: for line in f.readlines(): line = line.split('#', 1)[0].strip() if not line: