mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[lit] Adjust error handling for decode introduced by r374665
On that decode, Windows bots fail with: ``` UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128) ``` That's the same error as before r374665 except it's now at the decode before the write to stdout. llvm-svn: 374666
This commit is contained in:
parent
cb72157724
commit
ef602e4f5b
@ -97,7 +97,7 @@ def compareTwoTextFiles(flags, filepaths, filelines_bin, encoding):
|
||||
n = flags.num_context_lines):
|
||||
if hasattr(diff, 'decode'):
|
||||
# python 2.7
|
||||
diff = diff.decode()
|
||||
diff = diff.decode(errors="backslashreplace")
|
||||
sys.stdout.write(diff)
|
||||
exitCode = 1
|
||||
return exitCode
|
||||
|
Loading…
Reference in New Issue
Block a user