Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mirrorselect:master commit in: mirrorselect/
Date: Sun, 02 Mar 2014 07:44:12
Message-Id: 1382246141.1f4d0ba04d038cf1374975af217db646bfbc8f31.dol-sen@gentoo
1 commit: 1f4d0ba04d038cf1374975af217db646bfbc8f31
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 20 05:15:41 2013 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Sun Oct 20 05:15:41 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=1f4d0ba0
7
8 fix HTTPError import and exception
9
10 ---
11 mirrorselect/selectors.py | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14 diff --git a/mirrorselect/selectors.py b/mirrorselect/selectors.py
15 index d59d601..1544937 100644
16 --- a/mirrorselect/selectors.py
17 +++ b/mirrorselect/selectors.py
18 @@ -41,7 +41,7 @@ if sys.version_info[0] >= 3:
19 url_parse = urllib.parse.urlparse
20 url_unparse = urllib.parse.urlunparse
21 url_open = urllib.request.urlopen
22 - HTTPError = urllib.HTTPError
23 + HTTPError = urllib.error.HTTPError
24 else:
25 import urllib2
26 import urlparse
27 @@ -402,7 +402,7 @@ class Deep(object):
28 early_out = True
29 finally:
30 signal.alarm(0)
31 - except HTTPError, e:
32 + except HTTPError as e:
33 self.output.write(('deeptime(): connection to host %s\n' + \
34 ' returned HTTPError: %s for ip %s\n' \
35 ' Switching back to original url\n') % \