diff options
-rw-r--r-- | voctocore/lib/controlserver.py | 4 | ||||
-rw-r--r-- | voctogui/lib/connection.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/voctocore/lib/controlserver.py b/voctocore/lib/controlserver.py index b96d11d..22dd305 100644 --- a/voctocore/lib/controlserver.py +++ b/voctocore/lib/controlserver.py @@ -65,7 +65,9 @@ class ControlServer(TCPMultiConnection): self.close_connection(conn) return False - self.log.debug("remaining %r", lines[-1]) + if lines[-1] != '': + self.log.debug("remaining %r", lines[-1]) + leftovers.append(lines[-1]) return True diff --git a/voctogui/lib/connection.py b/voctogui/lib/connection.py index 42a403e..0df302a 100644 --- a/voctogui/lib/connection.py +++ b/voctogui/lib/connection.py @@ -80,7 +80,9 @@ def on_data(conn, _, leftovers, *args): line = line.strip() command_queue.put((line, conn)) - log.debug("remaining %r", lines[-1]) + if lines[-1] != '': + log.debug("remaining %r", lines[-1]) + leftovers.append(lines[-1]) return True |