[yum-git] yum/yumRepo.py

James Antill james at linux.duke.edu
Thu Mar 13 15:20:51 UTC 2008


 yum/yumRepo.py |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit c462a78525ca381eec0a1e4ede3ef217c2a21a37
Author: James Antill <james at and.org>
Date:   Thu Mar 13 11:20:25 2008 -0400

    Fix proxy=http://foo:123 - bug#328121

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index e90981b..202eb48 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -380,7 +380,12 @@ class YumRepository(Repository, config.RepoConf):
                 proxy_parsed = urlparse.urlsplit(self.proxy, allow_fragments=0)
                 proxy_proto = proxy_parsed[0]
                 proxy_host = proxy_parsed[1]
-                proxy_rest = proxy_parsed[2] + '?' + proxy_parsed[3]
+                # http://foo:123 == ('http', 'foo:123', '', '', '')
+                # don't turn that into: http://foo:123? - bug#328121
+                if proxy_parsed[2] == '':
+                    proxy_rest = ''
+                else:
+                    proxy_rest = proxy_parsed[2] + '?' + proxy_parsed[3]
                 proxy_string = '%s://%s@%s%s' % (proxy_proto,
                         self.proxy_username, proxy_host, proxy_rest)
 



More information about the Yum-cvs-commits mailing list