Don't display errors in snarfers,, mo.

This commit is contained in:
Jeremy Fincher 2004-02-27 17:20:57 +00:00
parent 700fe71958
commit 4b1e5b5a74

View File

@ -197,7 +197,11 @@ class URL(callbacks.PrivmsgCommandAndRegexp,
channel = msg.args[0] channel = msg.args[0]
if self.registryValue('titleSnarfer', channel): if self.registryValue('titleSnarfer', channel):
url = match.group(0) url = match.group(0)
text = webutils.getUrl(url, size=conf.supybot.httpPeekSize()) try:
text = webutils.getUrl(url, size=conf.supybot.httpPeekSize())
except webutils.WebError, e:
self.log.info('Couldn\'t snarf title of %s, %s.', url, e)
return
m = self._titleRe.search(text) m = self._titleRe.search(text)
if m is not None: if m is not None:
domain = webutils.getDomain(url) domain = webutils.getDomain(url)