summaryrefslogtreecommitdiff
path: root/gpscat
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-02-12 07:57:15 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-02-12 07:57:15 +0000
commitdfefb4762fa7e941849b806c35bdfb5a811f2582 (patch)
treed8d4b6bb103f9dcb22c5faf5cb74d0feeb82121d /gpscat
parent0de1b85b6e379aba7c17e5939988a297d99db33f (diff)
downloadgpsd-dfefb4762fa7e941849b806c35bdfb5a811f2582.tar.gz
Address tracker bug #14776 by fixing a logic error in the raw-mode dumping.
Diffstat (limited to 'gpscat')
-rwxr-xr-xgpscat7
1 files changed, 4 insertions, 3 deletions
diff --git a/gpscat b/gpscat
index 66563774..79e43e2e 100755
--- a/gpscat
+++ b/gpscat
@@ -104,9 +104,10 @@ if __name__ == '__main__':
if fd == tty and event == select.POLLIN:
if rawmode:
buf += os.read(tty, NMEA_MAX)
- if not buf.endswith("\r"):
- sys.stdout.write(hexdump(buf))
- buf = ""
+ if not buf.endswith("\n"):
+ buf = hexdump(buf)
+ sys.stdout.write(buf)
+ buf = ""
else:
(ptype, packet) = getter.get(tty)
length = len(packet)