[U-Boot] [PATCH 1/1] buildman: Translate more strings to latin-1
Tom Rini
trini at konsulko.com
Fri Apr 14 14:58:39 UTC 2017
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.
Cc: Simon Glass <sjg at chromium.org>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
tools/buildman/builderthread.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index f2b2acd1eba9..acaf5007f50c 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)
--
1.9.1
More information about the U-Boot
mailing list