diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-22 23:08:34 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-22 23:08:34 +0000 |
commit | 0b87f38c11d786a3ebeddeac536ea3e62ad31998 (patch) | |
tree | fad99f7b95079c18356bafc36304ad3dcea8d5d7 /gps.py | |
parent | a39a89c7d6fa9eeab2eef21f6e8da028177e7168 (diff) | |
download | gpsd-0b87f38c11d786a3ebeddeac536ea3e62ad31998.tar.gz |
Oops - cope well if there is no satellite data.
Diffstat (limited to 'gps.py')
-rwxr-xr-x | gps.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -484,8 +484,9 @@ class gps(gpsdata): self.skyview.gpsdata = self for attrp in "xyvhpg": setattr(self.skyview, attrp+"dop", default(attrp+"dop", NaN, DOP_SET)) - for sat in self.data['satellites']: - self.skyview.satellites.append(satellite(PRN=sat['PRN'], elevation=sat['el'], azimuth=sat['az'], ss=sat['ss'], used=sat['used'])) + if "satellites" in self.data: + for sat in self.data['satellites']: + self.skyview.satellites.append(satellite(PRN=sat['PRN'], elevation=sat['el'], azimuth=sat['az'], ss=sat['ss'], used=sat['used'])) self.skyview.used = 0 for sat in self.skyview.satellites: if sat.used: |