Skip to content

Commit

Permalink
feat: only flush a non-empty buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
martynia committed Jan 23, 2024
1 parent 0a438b8 commit b6b9961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Pilot/pilotTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ def flush(self):
:return: None
:rtype: None
"""
if not self.output.closed:
if not self.output.closed and self._nlines > 0:
self.output.flush()
buf = self.getValue()
self.senderFunc(buf)
Expand Down

0 comments on commit b6b9961

Please sign in to comment.