diff options
author | Dmitry Selyutin <ghostmansd@gmail.com> | 2017-09-05 10:04:18 +0300 |
---|---|---|
committer | Dmitry Selyutin <ghostmansd@gmail.com> | 2017-09-08 17:27:55 +0300 |
commit | 3df666053421259b4f4ee32d4d67a8514ef126e4 (patch) | |
tree | 0cedbb996679dfc3b0859c08dc9d63c513c4707d /pygnulib/GLModuleSystem.py | |
parent | 1fdadd2ce8c539c14f138d563214260f1a32baa3 (diff) | |
download | gnulib-3df666053421259b4f4ee32d4d67a8514ef126e4.tar.gz |
gnulib-tool.py: fix errors on building wget2; use UTF-8 in subprocess
Diffstat (limited to 'pygnulib/GLModuleSystem.py')
-rw-r--r-- | pygnulib/GLModuleSystem.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index 53fe0a2712..34501e20e2 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModuleSystem.py @@ -151,13 +151,13 @@ class GLModuleSystem(object): # Read modules from gnulib root directory. os.chdir(constants.DIRS['root']) find = sp.Popen(find_args, stdout=sp.PIPE) - result += find.stdout.read().decode(ENCS['shell']) + result += find.stdout.read().decode("UTF-8") # Read modules from local directory. if localdir and isdir(joinpath(localdir, 'modules')): os.chdir(localdir) find = sp.Popen(find_args, stdout=sp.PIPE) - result += find.stdout.read().decode(ENCS['shell']) + result += find.stdout.read().decode("UTF-8") sed_args += ['-e', r's,\.diff$,,'] # Save the list of the modules to file. @@ -169,7 +169,7 @@ class GLModuleSystem(object): # Filter the list of the modules. stdin = codecs.open(path, 'rb', 'UTF-8') sed = sp.Popen(sed_args, stdin=stdin, stdout=sp.PIPE) - result = sed.stdout.read().decode(ENCS['shell']) + result = sed.stdout.read().decode("UTF-8") stdin.close(); os.remove(path) listing = [line for line in result.split('\n') if line.strip()] listing = sorted(set(listing)) |