diff options
author | Brian Dolbec <dolsen@gentoo.org> | 2014-01-23 14:56:44 -0800 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2014-01-23 14:56:44 -0800 |
commit | e1d0a9d4610eaafb9297e896ba4ed264e5fe939f (patch) | |
tree | 44bd1683f0244d01ecb76a9ea8a8d760f433d53e /mirrorselect | |
parent | Remove connections.py. Instead moved it to it's own ssl-fetch pkg. (diff) | |
download | mirrorselect-e1d0a9d4610eaafb9297e896ba4ed264e5fe939f.tar.gz mirrorselect-e1d0a9d4610eaafb9297e896ba4ed264e5fe939f.tar.bz2 mirrorselect-e1d0a9d4610eaafb9297e896ba4ed264e5fe939f.zip |
Use the new sslfetch pkg for the Connector class.
Diffstat (limited to 'mirrorselect')
-rw-r--r-- | mirrorselect/extractor.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mirrorselect/extractor.py b/mirrorselect/extractor.py index c8d5bd5..a949c75 100644 --- a/mirrorselect/extractor.py +++ b/mirrorselect/extractor.py @@ -30,8 +30,10 @@ Distributed under the terms of the GNU General Public License v2 import os from mirrorselect.mirrorparser3 import MirrorParser3 -from mirrorselect.connections import Connector +from sslfetch.connections import Connector +from mirrorselect.version import version +USERAGENT = "Mirrorselect-" + version class Extractor(object): """The Extractor employs a MirrorParser3 object to get a list of valid @@ -101,7 +103,7 @@ class Extractor(object): self.output.print_info('Downloading a list of mirrors...\n') - fetcher = Connector(self.output, self.proxies) + fetcher = Connector(self.output, self.proxies, USERAGENT) success, mirrorlist, timestamp = fetcher.fetch_content(url) parser.parse(mirrorlist) |