Merge pull request #411 from Hoaas/testing

Web: Fix fetch. Use getUrl instead of getUrlFd.
This commit is contained in:
Valentin Lorentz 2012-10-02 10:23:16 -07:00
commit 1fc11d0cea

View File

@ -253,9 +253,9 @@ class Web(callbacks.PluginRegexp):
irc.error(_('This command is disabled ' irc.error(_('This command is disabled '
'(supybot.plugins.Web.fetch.maximum is set to 0).'), '(supybot.plugins.Web.fetch.maximum is set to 0).'),
Raise=True) Raise=True)
fd = utils.web.getUrlFd(url) \ fd = utils.web.getUrl(url, size=max) \
.decode('utf8') .decode('utf8')
irc.reply(fd.read(max)) irc.reply(fd)
fetch = wrap(fetch, ['url']) fetch = wrap(fetch, ['url'])
Class = Web Class = Web