diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-09-21 14:13:55 +0545 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-09-21 14:13:55 +0545 |
commit | a94b2f664714a33eeeb492efe87525fa9947a644 (patch) | |
tree | 4a0936ac8e51a7854303cd6ecc13def63d39d964 | |
parent | lddtree: sort imports (diff) | |
download | pax-utils-a94b2f664714a33eeeb492efe87525fa9947a644.tar.gz pax-utils-a94b2f664714a33eeeb492efe87525fa9947a644.tar.bz2 pax-utils-a94b2f664714a33eeeb492efe87525fa9947a644.zip |
lddtree: specify utf-8 encoding with text files
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-x | lddtree.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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: |