From e818ba3a132cc233fd24126802bbbdcafd0fa6d5 Mon Sep 17 00:00:00 2001 From: Fred Wright Date: Fri, 8 Apr 2016 10:07:45 -0700 Subject: Fixes xgps for Python 3. This replaces the obsolete 'cmp' keyword for 'sorted' with the still-available (and more efficient) 'key' keyword. TESTED: Ran xgps with Python 2.7, 3.3, 3.4, and 3.5 (with appropriate builds). --- xgps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xgps') diff --git a/xgps b/xgps index c7955b4b..79fd3fb2 100755 --- a/xgps +++ b/xgps @@ -785,7 +785,7 @@ class Base: fld = fld[1:] satellites = sorted( satellites[:], - cmp=lambda x, y: cmp(x[fld], y[fld]), reverse=rev) + key=lambda x: x[fld], reverse=rev) for (i, satellite) in enumerate(satellites): self.set_satlist_field(i, 0, satellite.PRN) -- cgit v1.2.1