[yum-commits] Branch 'yum-3_2_X' - yum/__init__.py
skvidal at osuosl.org
skvidal at osuosl.org
Tue Mar 30 18:40:20 UTC 2010
yum/__init__.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 3e1d76650dc1c5c6128a75230db80d50e56fde65
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Tue Mar 30 14:39:34 2010 -0400
change out the repo_setopts fix so instead of hasattr'ing it - we
are adding an empty one.
diff --git a/yum/__init__.py b/yum/__init__.py
index f7dd8f2..cbb0dfa 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -150,6 +150,9 @@ class YumBase(depsolve.Depsolve):
self.logger = logging.getLogger("yum.YumBase")
self.verbose_logger = logging.getLogger("yum.verbose.YumBase")
self._repos = RepoStorage(self)
+ self.repo_setopts = {} # since we have to use repo_setopts in base and
+ # not in cli - set it up as empty so no one
+ # trips over it later
# Start with plugins disabled
self.disablePlugins()
@@ -377,7 +380,7 @@ class YumBase(depsolve.Depsolve):
thisrepo.repo_config_age = repo_age
thisrepo.repofile = repofn
- if hasattr(self, 'repo_setopts') and thisrepo.id in self.repo_setopts:
+ if thisrepo.id in self.repo_setopts:
for opt in self.repo_setopts[thisrepo.id].items:
setattr(thisrepo, opt, getattr(self.repo_setopts[thisrepo.id], opt))
More information about the Yum-commits
mailing list