summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/buildman/builderthread.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index acaf5007f5..9e8ca80c5b 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -280,13 +280,15 @@ class BuilderThread(threading.Thread):
outfile = os.path.join(build_dir, 'log')
with open(outfile, 'w') as fd:
if result.stdout:
- fd.write(result.stdout.encode('latin-1', 'ignore'))
+ # We don't want unicode characters in log files
+ fd.write(result.stdout.decode('UTF-8').encode('ASCII', 'replace'))
errfile = self.builder.GetErrFile(result.commit_upto,
result.brd.target)
if result.stderr:
with open(errfile, 'w') as fd:
- fd.write(result.stderr.encode('latin-1', 'ignore'))
+ # We don't want unicode characters in log files
+ fd.write(result.stderr.decode('UTF-8').encode('ASCII', 'replace'))
elif os.path.exists(errfile):
os.remove(errfile)