Skip to content

Commit f0bfaa4

Browse files
nordic-piksnashif
authored andcommitted
scripts: pylib: twister: fix missing newlines at handler.log
Keep new lines at handler.log. Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
1 parent fb7c2a7 commit f0bfaa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/pylib/twister/twisterlib/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def monitor_serial(self, ser, halt_event, harness):
444444
# is available yet.
445445
if serial_line:
446446
# can be more lines in serial_line so split them before handling
447-
for sl in serial_line.decode('utf-8', 'ignore').splitlines():
447+
for sl in serial_line.decode('utf-8', 'ignore').splitlines(keepends=True):
448448
log_out_fp.write(strip_ansi_sequences(sl).encode('utf-8'))
449449
log_out_fp.flush()
450450
if sl := sl.strip():

0 commit comments

Comments
 (0)