Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mirrorselect:ssl commit in: mirrorselect/
Date: Fri, 31 Jan 2014 15:44:55
Message-Id: 1390517804.e1d0a9d4610eaafb9297e896ba4ed264e5fe939f.dol-sen@gentoo
1 commit: e1d0a9d4610eaafb9297e896ba4ed264e5fe939f
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 23 22:56:44 2014 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Thu Jan 23 22:56:44 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=e1d0a9d4
7
8 Use the new sslfetch pkg for the Connector class.
9
10 ---
11 mirrorselect/extractor.py | 6 ++++--
12 1 file changed, 4 insertions(+), 2 deletions(-)
13
14 diff --git a/mirrorselect/extractor.py b/mirrorselect/extractor.py
15 index c8d5bd5..a949c75 100644
16 --- a/mirrorselect/extractor.py
17 +++ b/mirrorselect/extractor.py
18 @@ -30,8 +30,10 @@ Distributed under the terms of the GNU General Public License v2
19 import os
20
21 from mirrorselect.mirrorparser3 import MirrorParser3
22 -from mirrorselect.connections import Connector
23 +from sslfetch.connections import Connector
24 +from mirrorselect.version import version
25
26 +USERAGENT = "Mirrorselect-" + version
27
28 class Extractor(object):
29 """The Extractor employs a MirrorParser3 object to get a list of valid
30 @@ -101,7 +103,7 @@ class Extractor(object):
31
32 self.output.print_info('Downloading a list of mirrors...\n')
33
34 - fetcher = Connector(self.output, self.proxies)
35 + fetcher = Connector(self.output, self.proxies, USERAGENT)
36 success, mirrorlist, timestamp = fetcher.fetch_content(url)
37 parser.parse(mirrorlist)