1 |
commit: dc98292e2aeca8ec13aceb2efce802d9375e11aa |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 1 03:49:11 2014 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Sat Feb 1 03:53:59 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=dc98292e |
7 |
|
8 |
Tweak the proxy code to correctly handle the cli option. |
9 |
|
10 |
--- |
11 |
mirrorselect/extractor.py | 7 ++++--- |
12 |
1 file changed, 4 insertions(+), 3 deletions(-) |
13 |
|
14 |
diff --git a/mirrorselect/extractor.py b/mirrorselect/extractor.py |
15 |
index 217d1e1..eb26faf 100644 |
16 |
--- a/mirrorselect/extractor.py |
17 |
+++ b/mirrorselect/extractor.py |
18 |
@@ -58,10 +58,11 @@ class Extractor(object): |
19 |
self.proxies = {} |
20 |
|
21 |
for proxy in ['http_proxy', 'https_proxy']: |
22 |
- if options.proxy: |
23 |
- self.proxies[proxy.split('_')[0]] = options.proxy |
24 |
+ prox = proxy.split('_')[0] |
25 |
+ if options.proxy and prox + ":" in options.proxy: |
26 |
+ self.proxies[prox] = options.proxy |
27 |
elif os.getenv(proxy): |
28 |
- self.proxies[proxy.split('_')[0]] = os.getenv(proxy) |
29 |
+ self.proxies[prox] = os.getenv(proxy) |
30 |
|
31 |
parser = MirrorParser3() |
32 |
self.hosts = [] |