From 8d7820fdc34eaa9296bac60d358d10e377f8ffab Mon Sep 17 00:00:00 2001 From: Fred Wright Date: Sun, 27 Mar 2016 01:09:14 -0700 Subject: Fixes gpsprof to work with Python 2.6. 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(-) (limited to 'gpsprof') diff --git a/gpsprof b/gpsprof index 63090048..88dc4273 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": -- cgit v1.2.1