Skip to content

Commit 4690e2b

Browse files
Merge pull request #1923 from Bastian-Krause/bst/processwrapper-nl
util/helper: fix appending \n to unterminated final streamed chunks in ProcessWrapper
2 parents 063d1bd + 9b96a0e commit 4690e2b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

labgrid/util/helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def check_output(self, command, *, print_on_silent_log=False, input=None, stdin=
142142
if buf:
143143
# process incomplete line
144144
res.append(buf)
145-
if buf[-1] != b'\n':
145+
if not buf.endswith(b'\n'):
146146
buf += b'\n'
147147
for callback in self.callbacks:
148148
callback(buf, process)

0 commit comments

Comments
 (0)