diff options
author | 2014-01-31 19:49:11 -0800 | |
---|---|---|
committer | 2014-01-31 19:53:59 -0800 | |
commit | dc98292e2aeca8ec13aceb2efce802d9375e11aa (patch) | |
tree | 9cc6d35d2b9277b528f31003f954e20a06c9f79b | |
parent | Indent adjustment (diff) | |
download | mirrorselect-ssl.tar.gz mirrorselect-ssl.tar.bz2 mirrorselect-ssl.zip |
Tweak the proxy code to correctly handle the cli option.ssl
-rw-r--r-- | mirrorselect/extractor.py | 7 |
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 = [] |