[yum-commits] Branch 'yum-3_2_X' - 2 commits - yum/repos.py yum/yumRepo.py
James Antill
james at osuosl.org
Thu Jun 2 15:40:15 UTC 2011
yum/repos.py | 7 ++++++-
yum/yumRepo.py | 7 ++++---
2 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 3d7c28d4ec579b97e30b75364d4662ec360d70ca
Author: James Antill <james at and.org>
Date: Thu Jun 2 10:28:50 2011 -0400
Fix for pulp directly using RepoStorage() without a YumBase().
diff --git a/yum/repos.py b/yum/repos.py
index 4ea4961..3793bad 100644
--- a/yum/repos.py
+++ b/yum/repos.py
@@ -110,7 +110,12 @@ class RepoStorage:
repoobj.quick_enable_disable = self.quick_enable_disable
else:
self._cache_enabled_repos = None
- repoobj._override_sigchecks = self.ayum._override_sigchecks
+ # At least pulp reuses RepoStorage but doesn't have a "real" YumBase()
+ # so we can't guarantee new YumBase() attrs. exist.
+ if not hasattr(self.ayum, '_override_sigchecks'):
+ repoobj._override_sigchecks = False
+ else:
+ repoobj._override_sigchecks = self.ayum._override_sigchecks
def delete(self, repoid):
if repoid in self.repos:
commit b472ab565a83441d0600467dd1a7c74fbfb6eb44
Author: James Antill <james at and.org>
Date: Wed Jun 1 17:16:27 2011 -0400
Make empty proxy/proxy_username mean the same as unset/_none_. BZ 709188.
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 1568c54..e5e9ece 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -430,9 +430,10 @@ class YumRepository(Repository, config.RepoConf):
self._proxy_dict = {} # zap it
proxy_string = None
- if self.proxy not in [None, '_none_']:
+ empty = (None, '_none_', '')
+ if self.proxy not in empty:
proxy_string = '%s' % self.proxy
- if self.proxy_username is not None:
+ if self.proxy_username not in empty:
proxy_parsed = urlparse.urlsplit(self.proxy, allow_fragments=0)
proxy_proto = proxy_parsed[0]
proxy_host = proxy_parsed[1]
@@ -445,7 +446,7 @@ class YumRepository(Repository, config.RepoConf):
proxy_string = '%s://%s@%s%s' % (proxy_proto,
self.proxy_username, proxy_host, proxy_rest)
- if self.proxy_password is not None:
+ if self.proxy_password not in empty:
proxy_string = '%s://%s:%s@%s%s' % (proxy_proto,
self.proxy_username, self.proxy_password,
proxy_host, proxy_rest)
More information about the Yum-commits
mailing list