From 52ec05a0411270543a36fdd0dbc3d0b930989399 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 1 Nov 2015 10:24:03 -0800 Subject: [PATCH] DDG: remove broken error catching (irc isn't in the _ddgurl namespace) --- DDG/plugin.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/DDG/plugin.py b/DDG/plugin.py index fdf197c..9ec029d 100644 --- a/DDG/plugin.py +++ b/DDG/plugin.py @@ -62,10 +62,7 @@ def _ddgurl(self, text): # DuckDuckGo has a 'lite' site free of unparseable JavaScript # elements, so we'll use that to our advantage! url = "https://duckduckgo.com/lite?" + urlencode({"q": text}) - try: - data = utils.web.getUrl(url).decode("utf-8") - except utils.web.Error as e: - irc.error(str(e), Raise=True) + data = utils.web.getUrl(url).decode("utf-8") soup = BeautifulSoup(data) # Remove "sponsored link" results return [td for td in soup.find_all('td') if 'result-sponsored' not in str(td.parent.get('class'))]