Use surrogateescape with outfilter.py
When switching to using log-file capture, we're getting [gentoo/build-succeeds] outfile.write(ts_line.encode('utf-8')) [gentoo/build-succeeds] UnicodeEncodeError: 'utf-8' codec can't encode character 'udcc5' in position 59: surrogates not allowed Use surrogateescape [1] on the output to avoid this [1] https://www.python.org/dev/peps/pep-0383/ Change-Id: I2c2c537296edfa5a8fe661a41bd5bfb3bfcf57e3
This commit is contained in:
parent
668c93b118
commit
596062b0f9
@ -78,7 +78,8 @@ def main():
|
||||
if sys.version_info < (3,):
|
||||
outfile.write(ts_line)
|
||||
else:
|
||||
outfile.write(ts_line.encode('utf-8'))
|
||||
outfile.write(
|
||||
ts_line.encode('utf-8', errors='surrogateescape'))
|
||||
outfile.flush()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user