From 0134696b8bac728c09cb2602ee9096f46f9e18ad Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 4 Aug 2012 20:25:36 +0200 Subject: [PATCH] Misc: make plugin py3k-friendly. --- plugins/Misc/plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index 9dfc394f8..b5ad65a40 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -34,6 +34,7 @@ import imp import sys import json import time +from itertools import ifilter import supybot @@ -47,7 +48,6 @@ import supybot.ircutils as ircutils import supybot.callbacks as callbacks from supybot import commands -from supybot.utils.iter import ifilter from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Misc') @@ -296,7 +296,8 @@ class Misc(callbacks.Plugin): 'commits/%s' versions = {} 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'] # Strip the last ':': version = ''.join(version.rsplit(':', 1))