summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-04-14 14:06:28 (GMT)
committerTom Rini <trini@konsulko.com>2017-04-14 16:21:48 (GMT)
commitfbeb33752999e7317113199ef89873d6b6916814 (patch)
treeaf82bbe4445cea7c78b0d282ea53726c6c370967 /tools
parentbdf1ea11c8d8789bf95a284d6c980eafea13d94c (diff)
downloadu-boot-fbeb33752999e7317113199ef89873d6b6916814.tar.xz
buildman: Translate more strings to latin-1
When writing out some of our results we may now have UTF-8 characters in there as well. Translate these to latin-1 and ignore any errors (as this is for diagnostic and given the githash anything else can be reconstructed by the user. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/buildman/builderthread.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index f2b2acd..acaf500 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -280,13 +280,13 @@ class BuilderThread(threading.Thread):
outfile = os.path.join(build_dir, 'log')
with open(outfile, 'w') as fd:
if result.stdout:
- fd.write(result.stdout)
+ fd.write(result.stdout.encode('latin-1', 'ignore'))
errfile = self.builder.GetErrFile(result.commit_upto,
result.brd.target)
if result.stderr:
with open(errfile, 'w') as fd:
- fd.write(result.stderr)
+ fd.write(result.stderr.encode('latin-1', 'ignore'))
elif os.path.exists(errfile):
os.remove(errfile)