summaryrefslogtreecommitdiff
path: root/plugins/backend
diff options
context:
space:
mode:
authorGui Chen <gui.chen@intel.com>2012-09-10 21:02:00 +0800
committerGui Chen <gui.chen@intel.com>2012-09-12 16:55:03 +0800
commitcc2cc14ffbd6755df7105a75f0e95d1a0d6d9e4c (patch)
treed1172829c9d5d5a2d7c82e69a534b3680e415b4a /plugins/backend
parentdaf500e5703366da2e77d705ac18e3a0f9a1549b (diff)
downloadmic-cc2cc14ffbd6755df7105a75f0e95d1a0d6d9e4c.tar.gz
mic-cc2cc14ffbd6755df7105a75f0e95d1a0d6d9e4c.tar.bz2
mic-cc2cc14ffbd6755df7105a75f0e95d1a0d6d9e4c.zip
proxy setting to be compatible with old version of yum
Signed-off-by: Gui Chen <gui.chen@intel.com>
Diffstat (limited to 'plugins/backend')
-rw-r--r--plugins/backend/yumpkgmgr.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/backend/yumpkgmgr.py b/plugins/backend/yumpkgmgr.py
index 063bad4..90f9c77 100644
--- a/plugins/backend/yumpkgmgr.py
+++ b/plugins/backend/yumpkgmgr.py
@@ -73,11 +73,13 @@ class MyYumRepository(yum.yumRepo.YumRepository):
M2Crypto.SSL.Connection.clientPostConnectionCheck = None
proxy = None
- proxies = None
if url:
proxy = get_proxy_for(url)
+ else:
+ proxy = get_proxy_for(self.urls[0])
+
if proxy:
- proxies = {str(url.split(':')[0]): str(proxy)}
+ self.proxy = str(proxy)
size = int(size) if size else None
rvalue = super(MyYumRepository, self)._getFile(url,
@@ -90,8 +92,7 @@ class MyYumRepository(yum.yumRepo.YumRepository):
text,
reget,
cache,
- size,
- proxies=proxies)
+ size)
if m2c_connection and \
not M2Crypto.SSL.Connection.clientPostConnectionCheck: