mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Misc: make plugin py3k-friendly.
This commit is contained in:
parent
987aaa6c37
commit
0134696b8b
@ -34,6 +34,7 @@ import imp
|
|||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
|
from itertools import ifilter
|
||||||
|
|
||||||
import supybot
|
import supybot
|
||||||
|
|
||||||
@ -47,7 +48,6 @@ import supybot.ircutils as ircutils
|
|||||||
import supybot.callbacks as callbacks
|
import supybot.callbacks as callbacks
|
||||||
from supybot import commands
|
from supybot import commands
|
||||||
|
|
||||||
from supybot.utils.iter import ifilter
|
|
||||||
from supybot.i18n import PluginInternationalization, internationalizeDocstring
|
from supybot.i18n import PluginInternationalization, internationalizeDocstring
|
||||||
_ = PluginInternationalization('Misc')
|
_ = PluginInternationalization('Misc')
|
||||||
|
|
||||||
@ -296,7 +296,8 @@ class Misc(callbacks.Plugin):
|
|||||||
'commits/%s'
|
'commits/%s'
|
||||||
versions = {}
|
versions = {}
|
||||||
for branch in ('master', 'testing'):
|
for branch in ('master', 'testing'):
|
||||||
data = json.load(utils.web.getUrlFd(newestUrl % branch))
|
data = json.loads(utils.web.getUrl(newestUrl % branch)
|
||||||
|
.decode('utf8'))
|
||||||
version = data['commit']['committer']['date']
|
version = data['commit']['committer']['date']
|
||||||
# Strip the last ':':
|
# Strip the last ':':
|
||||||
version = ''.join(version.rsplit(':', 1))
|
version = ''.join(version.rsplit(':', 1))
|
||||||
|
Loading…
Reference in New Issue
Block a user