diff options
author | Gary E. Miller <gem@rellim.com> | 2018-09-21 20:03:25 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-09-21 20:03:25 -0700 |
commit | 182b6b24db6353b6ccb99913cc268f3c96f81d4c (patch) | |
tree | db715f446f9784ea0705d9d8d532f3b81907e4ad /gps | |
parent | 8a3fbe8e406691827d418cee5f7bfb5be66dd233 (diff) | |
download | gpsd-182b6b24db6353b6ccb99913cc268f3c96f81d4c.tar.gz |
gps/client.py: fix for Python 3.
Diffstat (limited to 'gps')
-rw-r--r-- | gps/client.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gps/client.py b/gps/client.py index 8d9d858c..a1a5b68f 100644 --- a/gps/client.py +++ b/gps/client.py @@ -153,7 +153,9 @@ class gpscommon(object): def send(self, commands): "Ship commands to the daemon." - lineend = polybytes("\n") + lineend = "\n" + if isinstance(commands, bytes): + lineend = polybytes("\n") if not commands.endswith(lineend): commands += lineend |