From d4937812a839452e26db29ed98c0563b2d6f4a1c Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 18 Mar 2017 23:39:32 -1000 Subject: [PATCH] Remove HTTPError code Only used to look nice but useless (inherits from IOError anyway) --- morss/morss.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/morss/morss.py b/morss/morss.py index 2b5b40d..b38b0b0 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -25,13 +25,11 @@ from html2text import HTML2Text try: from Queue import Queue from httplib import HTTPException - from urllib2 import HTTPError from urllib import quote_plus from urlparse import urlparse, urljoin, parse_qs except ImportError: from queue import Queue from http.client import HTTPException - from urllib.error import HTTPError from urllib.parse import quote_plus from urllib.parse import urlparse, urljoin, parse_qs @@ -354,9 +352,6 @@ def FeedFetch(url, options): con = crawler.custom_handler('xml', True, delay, options.encoding).open(url, timeout=TIMEOUT * 2) xml = con.read() - except (HTTPError) as e: - raise MorssException('Error downloading feed (HTTP Error %s)' % e.code) - except (IOError, HTTPException): raise MorssException('Error downloading feed')