summaryrefslogtreecommitdiff
path: root/gpspoller.py
diff options
context:
space:
mode:
authorroot <root@overo.(none)>2012-08-08 10:44:12 +0100
committerroot <root@overo.(none)>2012-08-08 10:44:12 +0100
commitd658ce2496999ea5a38a4691f7a21e937cbed825 (patch)
treeb725b8b6b503c7bf28b4baf13def0db166e37154 /gpspoller.py
parent38eca426c03946cc42d7d683c09fefba324f19bf (diff)
small fix for no sats visible
Diffstat (limited to 'gpspoller.py')
-rwxr-xr-x[-rw-r--r--]gpspoller.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gpspoller.py b/gpspoller.py
index 48105ad..45d0499 100644..100755
--- a/gpspoller.py
+++ b/gpspoller.py
@@ -58,7 +58,10 @@ class GpsPoller(threading.Thread):
print "caught serial error"
try:
if line[0:6] =='$GPGSV':
- self.satellites=string.atoi(datablock[3])
+ try:
+ self.satellites=string.atoi(datablock[3])
+ except:
+ self.satellites=0
if line[0:6] =='$GPGSA':
self.fix=string.atoi(datablock[2])
if line[0:6] == '$GPGGA':