Skip to content

Commit fa6bb85

Browse files
author
MarcoFalke
committed
test: Ignore UTF-8 errors in assert_debug_log
read() fails in text mode when the unicode hasn't been fully written yet. Fixes: "wallet_importdescriptors.py: can't decode bytes in position 228861-228863: unexpected end of data" (bitcoin/bitcoin#28030)
1 parent fa63326 commit fa6bb85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/functional/test_framework/test_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def assert_debug_log(self, expected_msgs, unexpected_msgs=None, timeout=2):
440440

441441
while True:
442442
found = True
443-
with open(self.debug_log_path, encoding='utf-8') as dl:
443+
with open(self.debug_log_path, encoding="utf-8", errors="replace") as dl:
444444
dl.seek(prev_size)
445445
log = dl.read()
446446
print_log = " - " + "\n - ".join(log.splitlines())

0 commit comments

Comments
 (0)