gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH] Fixes gpsprof to work with Python 2.6.


From: Fred Wright
Subject: [gpsd-dev] [PATCH] Fixes gpsprof to work with Python 2.6.
Date: Sun, 27 Mar 2016 01:09:14 -0700

The dict-without-values construct as a set initializer doesn't
work in Python 2.6, though the usual set constructor does.

This is not a recent bug.

TESTED:
Verified that gpsprof now works in Python 2.6, 2.7, 3.3, 3.4, and 3.5,
at least in the TPV mode.  Unable to test the PPS cases since gpsd
doesn't recognize my PPS source (but the syntax is identical).
---
 gpsprof | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gpsprof b/gpsprof
index 6309004..88dc427 100755
--- a/gpsprof
+++ b/gpsprof
@@ -58,7 +58,7 @@ class plotter:
     def __init__(self):
         self.fixes = []
         self.start_time = int(time.time())
-        self.watch = {"TPV"}
+        self.watch = set(['TPV'])
 
     def whatami(self):
         "How do we identify this plotting run?"
@@ -282,7 +282,7 @@ class timeplot(plotter):
 
     def __init__(self):
         plotter.__init__(self)
-        self.watch = {"PPS"}
+        self.watch = set(['PPS'])
 
     def sample(self):
         if self.session.data["class"] == "PPS":
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]