diff options
author | Fred Wright <fw@fwright.net> | 2016-04-09 19:57:14 -0700 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-04-10 04:58:50 -0400 |
commit | 7a98971bd84ee294cb233887243d32bdb1d29520 (patch) | |
tree | bef431d85b95fd4e5d271d29797155d3ad13950a /jsongen.py | |
parent | c1fc8432489e10ab08e2fc9c66312343e9245032 (diff) | |
download | gpsd-7a98971bd84ee294cb233887243d32bdb1d29520.tar.gz |
Fixes leapseconds.py for Python 3.
This fixes two Python 3 issues with leapsecond.py:
1) The urllib module is subdivided in Python 3. Only the 'request'
submodule is needed here. Either that or the Python 2 urllib is now
imported as 'urlrequest'.
2) The data returned by urlopen() is 'bytes' in Python 3, requiring
the polystr transformation to be usable as a string.
Also, the (duplicate) isotime() definition here has been updated to
match the version in gps/misc.py. It is still duplicated to avoid a
dependency on the latter, as is the needed portion of the polystr
code.
TESTED:
Ran "scons build-all check". Also ran "leapsecond.py -f" with all six
supported Python versions, and verified that the result matches the
existing leapseconds.cache. Did *not* test the updated retrieve()
function, but it's not used anywhere.
Diffstat (limited to 'jsongen.py')
0 files changed, 0 insertions, 0 deletions