zts-report: don't crash on non-UTF-8 chars in the log

The report generator expects the log to be clean and tidy UTF-8. That
can be a problem if you use some of the verbose/debug test runner
options, which sends all sorts of weird output from arbitrary programs
to the log.

This just makes Python a little more relaxed about such things. It
shouldn't matter in practice, as those lines didn't match the test
result regex anyway, and are discarded immediately.

Signed-off-by: Rob Norris <robn@despairlabs.com>
Sponsored-by: https://despairlabs.com/sponsor/
This commit is contained in:
Rob Norris 2024-09-01 14:15:05 +10:00
parent d4d79451cb
commit 3c6376eabc
1 changed files with 1 additions and 1 deletions

View File

@ -389,7 +389,7 @@ if os.environ.get('CI') == 'true':
def process_results(pathname):
try:
f = open(pathname)
f = open(pathname, errors='replace')
except IOError as e:
print('Error opening file:', e)
sys.exit(1)