1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +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:
Joel E. Denny 2019-10-12 16:25:46 +00:00
parent cb72157724
commit ef602e4f5b

View File

@ -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