[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH] Fixes xgps breakage from commit f330da9.
From: |
Fred Wright |
Subject: |
[gpsd-dev] [PATCH] Fixes xgps breakage from commit f330da9. |
Date: |
Thu, 7 Apr 2016 23:23:18 -0700 |
Since the 'status' attribute may not necessarily exist, one needs to
be more careful about attempting to acccess it.
TESTED:
Ran the previously failing xgps, which works again. Don't have a
readily available test case for the DGPS case.
---
xgps | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xgps b/xgps
index 0e8f79a..4744497 100755
--- a/xgps
+++ b/xgps
@@ -759,7 +759,7 @@ class Base:
status = "3D FIX"
else:
status = "NO FIX"
- if data.status == gps.STATUS_DGPS_FIX:
+ if hasattr(data, 'status') and data.status == gps.STATUS_DGPS_FIX:
status += " DIFF"
if data.mode != self.saved_mode:
self.last_transition = time.time()
--
2.8.0