diff options
author | Gary E. Miller <gem@rellim.com> | 2018-09-15 17:16:20 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-09-15 17:16:20 -0700 |
commit | e5d100eae1f35db2ffdaf2d87a3de0b06faa3f83 (patch) | |
tree | 6170b4491c5b3093ccb24be2052048ed5abad235 /gps/client.py | |
parent | ab7e6a80278b0cd075f19261adb4ee918d983958 (diff) | |
download | gpsd-e5d100eae1f35db2ffdaf2d87a3de0b06faa3f83.tar.gz |
gps/client: Fix Python 3 problem in send().
Diffstat (limited to 'gps/client.py')
-rw-r--r-- | gps/client.py | 5 |
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 |