aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2014-01-31 19:49:11 -0800
committerBrian Dolbec <dolsen@gentoo.org>2014-01-31 19:53:59 -0800
commitdc98292e2aeca8ec13aceb2efce802d9375e11aa (patch)
tree9cc6d35d2b9277b528f31003f954e20a06c9f79b
parentIndent adjustment (diff)
downloadmirrorselect-dc98292e2aeca8ec13aceb2efce802d9375e11aa.tar.gz
mirrorselect-dc98292e2aeca8ec13aceb2efce802d9375e11aa.tar.bz2
mirrorselect-dc98292e2aeca8ec13aceb2efce802d9375e11aa.zip
Tweak the proxy code to correctly handle the cli option.ssl
-rw-r--r--mirrorselect/extractor.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mirrorselect/extractor.py b/mirrorselect/extractor.py
index 217d1e1..eb26faf 100644
--- a/mirrorselect/extractor.py
+++ b/mirrorselect/extractor.py
@@ -58,10 +58,11 @@ class Extractor(object):
self.proxies = {}
for proxy in ['http_proxy', 'https_proxy']:
- if options.proxy:
- self.proxies[proxy.split('_')[0]] = options.proxy
+ prox = proxy.split('_')[0]
+ if options.proxy and prox + ":" in options.proxy:
+ self.proxies[prox] = options.proxy
elif os.getenv(proxy):
- self.proxies[proxy.split('_')[0]] = os.getenv(proxy)
+ self.proxies[prox] = os.getenv(proxy)
parser = MirrorParser3()
self.hosts = []