aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/update.py
diff options
context:
space:
mode:
Diffstat (limited to 'layerindex/update.py')
-rwxr-xr-xlayerindex/update.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/layerindex/update.py b/layerindex/update.py
index 5ff7fb4ae7..e5987bbad2 100755
--- a/layerindex/update.py
+++ b/layerindex/update.py
@@ -11,6 +11,7 @@
import sys
import os
import optparse
+import codecs
import logging
import subprocess
import signal
@@ -45,10 +46,10 @@ def run_command_interruptible(cmd):
cmd, cwd=os.path.dirname(sys.argv[0]), shell=True, preexec_fn=reenable_sigint, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
+ reader = codecs.getreader('utf-8')(process.stdout, errors='surrogateescape')
buf = ''
while True:
- out = process.stdout.read(1)
- out = out.decode('utf-8')
+ out = reader.read(1, 1)
if out:
sys.stdout.write(out)
sys.stdout.flush()