diff options
author | Fred Wright <fw@fwright.net> | 2016-04-08 10:07:45 -0700 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-04-09 04:39:15 -0400 |
commit | e818ba3a132cc233fd24126802bbbdcafd0fa6d5 (patch) | |
tree | 7aa03bbd1c8ec647503c0dc5e266ee1b433ac965 /xgps | |
parent | 47c82fdffad20d946d3f485ff03f25d844f925d8 (diff) | |
download | gpsd-e818ba3a132cc233fd24126802bbbdcafd0fa6d5.tar.gz |
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).
Diffstat (limited to 'xgps')
-rwxr-xr-x | xgps | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |