Web: Fix fetch. Use getUrl instead of getUrlFd.

This commit is contained in:
Terje Hoås 2012-10-02 18:19:53 +02:00
parent 784b8c37f8
commit cb623b2f4e

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