Skip to content

Commit

Permalink
Follow-up fix for parsing non-utf8 chars
Browse files Browse the repository at this point in the history
Previous attempt to fix this in commit 7290540 ("tap13: fix parsing
non-utf8 chars") didn't take into account the hung test reporter, which
also reads the result file in order to report how many lines into the
result the test hung. Fix this as well.

Closes #442
  • Loading branch information
sergepetrenko committed Jul 24, 2024
1 parent 240cdea commit 6121d6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def process_timeout(self, delta_seconds):
result_file = task.task_tmp_result
result_file_summary = '(no result file {})'.format(result_file)
if os.path.exists(result_file):
with open(result_file, 'r') as f:
with open(result_file, 'r', encoding='utf-8', errors='replace') as f:
lines = sum(1 for _ in f)
result_file_summary = 'at {}:{}'.format(result_file,
lines)
Expand Down

0 comments on commit 6121d6d

Please sign in to comment.