Skip to content

Commit 52d3e4f

Browse files
sergepetrenkoylobankov
authored andcommitted
Follow-up fix for parsing non-utf8 chars
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
1 parent 240cdea commit 52d3e4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

listeners.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ def process_timeout(self, delta_seconds):
459459
result_file = task.task_tmp_result
460460
result_file_summary = '(no result file {})'.format(result_file)
461461
if os.path.exists(result_file):
462-
with open(result_file, 'r') as f:
462+
with open(result_file, 'r', encoding='utf-8', errors='replace') as f:
463463
lines = sum(1 for _ in f)
464464
result_file_summary = 'at {}:{}'.format(result_file,
465465
lines)

0 commit comments

Comments
 (0)