summaryrefslogtreecommitdiff
path: root/gpscat
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-01-07 23:37:03 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-01-07 23:37:03 +0000
commitd189b1b4bcd710aee63e288598aba431386e867e (patch)
tree527f41940744ae5b31f7ca700ea005bd7d66c875 /gpscat
parentf9da2d1289d923e27254c498f7f08cc9b172940a (diff)
downloadgpsd-d189b1b4bcd710aee63e288598aba431386e867e.tar.gz
There is no more EOF_PACKET type, so fix gpscat.
Diffstat (limited to 'gpscat')
-rwxr-xr-xgpscat4
1 files changed, 1 insertions, 3 deletions
diff --git a/gpscat b/gpscat
index 47981ad4..be4f629c 100755
--- a/gpscat
+++ b/gpscat
@@ -109,10 +109,8 @@ if __name__ == '__main__':
else:
(type, packet) = getter.get(tty)
length = len(packet)
- if type == gpspacket.EOF_PACKET:
+ if type == gpspacket.BAD_PACKET or length == 0:
break
- elif type == gpspacket.BAD_PACKET or length == 0:
- continue
if typeflag:
sys.stdout.write(`type` + " (" + `length` + "): " + hexdump(packet) + "\n")
else: