summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gps/client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gps/client.py b/gps/client.py
index 4b3573ca..6b0ada6e 100644
--- a/gps/client.py
+++ b/gps/client.py
@@ -153,8 +153,9 @@ class gpscommon(object):
def send(self, commands):
"Ship commands to the daemon."
- if not commands.endswith("\n"):
- commands += "\n"
+ lineend = polybytes("\n")
+ if not commands.endswith(lineend):
+ commands += lineend
if self.sock is None:
self.stream_command = commands