aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mirrorselect/selectors.py')
-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') % \