From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 0C47F13873B for ; Sun, 2 Mar 2014 07:44:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9B619E0A7E; Sun, 2 Mar 2014 07:44:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 31D5CE0A7E for ; Sun, 2 Mar 2014 07:44:54 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5A44F33FAAE for ; Sun, 2 Mar 2014 07:44:53 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 22BB7183B3 for ; Sun, 2 Mar 2014 07:44:52 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1391226839.dc98292e2aeca8ec13aceb2efce802d9375e11aa.dol-sen@gentoo> Subject: [gentoo-commits] proj/mirrorselect:ssl commit in: mirrorselect/ X-VCS-Repository: proj/mirrorselect X-VCS-Files: mirrorselect/extractor.py X-VCS-Directories: mirrorselect/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: dc98292e2aeca8ec13aceb2efce802d9375e11aa X-VCS-Branch: ssl Date: Sun, 2 Mar 2014 07:44:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f3ae8987-bfb7-4fff-ad70-7e9485db9c01 X-Archives-Hash: 4c8a139fe32eb62f60c29790662a1024 commit: dc98292e2aeca8ec13aceb2efce802d9375e11aa Author: Brian Dolbec gentoo org> AuthorDate: Sat Feb 1 03:49:11 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Sat Feb 1 03:53:59 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=dc98292e Tweak the proxy code to correctly handle the cli option. --- mirrorselect/extractor.py | 7 ++++--- 1 file 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 = [] From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C26F913873B for ; Sun, 2 Mar 2014 07:44:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F2E9AE0AA5; Sun, 2 Mar 2014 07:44:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 48F5AE0AAC for ; Sun, 2 Mar 2014 07:44:11 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 770EF33FB68 for ; Sun, 2 Mar 2014 07:44:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id A7803188F4 for ; Sun, 2 Mar 2014 07:44:08 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1391226839.dc98292e2aeca8ec13aceb2efce802d9375e11aa.dol-sen@gentoo> Subject: [gentoo-commits] proj/mirrorselect:master commit in: mirrorselect/ X-VCS-Repository: proj/mirrorselect X-VCS-Files: mirrorselect/extractor.py X-VCS-Directories: mirrorselect/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: dc98292e2aeca8ec13aceb2efce802d9375e11aa X-VCS-Branch: master Date: Sun, 2 Mar 2014 07:44:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 97c31baf-6ef3-4559-808a-560bd0ee2c76 X-Archives-Hash: bc14dcfd59e5b6e6088a75dd13bb3fec Message-ID: <20140302074408.VItKwrwW-8Yj4RmjFehfX6fwLJsrP03LEkRbF-FGcb4@z> commit: dc98292e2aeca8ec13aceb2efce802d9375e11aa Author: Brian Dolbec gentoo org> AuthorDate: Sat Feb 1 03:49:11 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Sat Feb 1 03:53:59 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mirrorselect.git;a=commit;h=dc98292e Tweak the proxy code to correctly handle the cli option. --- mirrorselect/extractor.py | 7 ++++--- 1 file 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 = []