aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2013-10-19 22:15:41 -0700
committerBrian Dolbec <dolsen@gentoo.org>2013-10-19 22:15:41 -0700
commit1f4d0ba04d038cf1374975af217db646bfbc8f31 (patch)
tree6662f05c3b27d5142d55e99e4f584b0d29331cc5 /mirrorselect
parentfix url testing for vhosts that do not handle ip requests. (diff)
downloadmirrorselect-1f4d0ba04d038cf1374975af217db646bfbc8f31.tar.gz
mirrorselect-1f4d0ba04d038cf1374975af217db646bfbc8f31.tar.bz2
mirrorselect-1f4d0ba04d038cf1374975af217db646bfbc8f31.zip
fix HTTPError import and exception
Diffstat (limited to 'mirrorselect')
-rw-r--r--mirrorselect/selectors.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mirrorselect/selectors.py b/mirrorselect/selectors.py
index d59d601..1544937 100644
--- a/mirrorselect/selectors.py
+++ b/mirrorselect/selectors.py
@@ -41,7 +41,7 @@ if sys.version_info[0] >= 3:
url_parse = urllib.parse.urlparse
url_unparse = urllib.parse.urlunparse
url_open = urllib.request.urlopen
- HTTPError = urllib.HTTPError
+ HTTPError = urllib.error.HTTPError
else:
import urllib2
import urlparse
@@ -402,7 +402,7 @@ class Deep(object):
early_out = True
finally:
signal.alarm(0)
- except HTTPError, e:
+ except HTTPError as e:
self.output.write(('deeptime(): connection to host %s\n' + \
' returned HTTPError: %s for ip %s\n' \
' Switching back to original url\n') % \