[yum-commits] Branch 'yum-3_2_X' - yum/__init__.py
Seth Vidal
skvidal at fedoraproject.org
Tue Mar 30 18:39:09 UTC 2010
On Tue, 30 Mar 2010, James Antill wrote:
> yum/__init__.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> New commits:
> commit ecfd7b5e643bab7337d44c981157768b86cab439
> Author: James Antill <james at and.org>
> Date: Tue Mar 30 14:31:11 2010 -0400
>
> Test for repo_setopts, only there for cli
>
> diff --git a/yum/__init__.py b/yum/__init__.py
> index 88d4467..f7dd8f2 100644
> --- a/yum/__init__.py
> +++ b/yum/__init__.py
> @@ -377,7 +377,7 @@ class YumBase(depsolve.Depsolve):
> thisrepo.repo_config_age = repo_age
> thisrepo.repofile = repofn
>
> - if thisrepo.id in self.repo_setopts:
> + if hasattr(self, 'repo_setopts') and 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))
good catch - but I'm going to change this out for adding a repo_setopts in
yumbase as an empty dict. Otherwise someone else stumbling through this
later might not know what to check for.
I won't add main setopts b/c they are never used outside of the cli. Wish
I could do the same for the repos but there's just no good place to make
sure they are hit at the beginning.
-sv
More information about the Yum-commits
mailing list