summaryrefslogtreecommitdiff
path: root/pygnulib/GLFileSystem.py
diff options
context:
space:
mode:
authorDmitry Selyutin <ghostmansd@gmail.com>2017-09-05 10:04:18 +0300
committerDmitry Selyutin <ghostmansd@gmail.com>2017-09-08 17:27:55 +0300
commit3df666053421259b4f4ee32d4d67a8514ef126e4 (patch)
tree0cedbb996679dfc3b0859c08dc9d63c513c4707d /pygnulib/GLFileSystem.py
parent1fdadd2ce8c539c14f138d563214260f1a32baa3 (diff)
downloadgnulib-3df666053421259b4f4ee32d4d67a8514ef126e4.tar.gz
gnulib-tool.py: fix errors on building wget2; use UTF-8 in subprocess
Diffstat (limited to 'pygnulib/GLFileSystem.py')
-rw-r--r--pygnulib/GLFileSystem.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygnulib/GLFileSystem.py b/pygnulib/GLFileSystem.py
index 6ccdc0b7ed..588df95cea 100644
--- a/pygnulib/GLFileSystem.py
+++ b/pygnulib/GLFileSystem.py
@@ -302,7 +302,7 @@ class GLFileAssistant(object):
try: # Try to move file
if os.path.exists(basepath):
os.remove(basepath)
- shutil.move(tmpfile, rewritten)
+ shutil.copy(tmpfile, rewritten)
except Exception as error:
raise(GLError(17, original))
else: # if self.config['dryrun']
@@ -352,7 +352,7 @@ class GLFileAssistant(object):
stdin = codecs.open(lookedup, 'rb', 'UTF-8')
try: # Try to transform file
data = sp.check_output(args, stdin=stdin, shell=False)
- data = data.decode(ENCS['shell'])
+ data = data.decode("UTF-8")
except Exception as error:
raise(GLError(16, lookedup))
with codecs.open(tmpfile, 'wb', 'UTF-8') as file: