From e5d100eae1f35db2ffdaf2d87a3de0b06faa3f83 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Sat, 15 Sep 2018 17:16:20 -0700 Subject: gps/client: Fix Python 3 problem in send(). --- gps/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gps/client.py') 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 -- cgit v1.2.1