[Yum-devel] [PATCH] Don't traceback on baseurl only repos. which have network failures, BZ 525094
Seth Vidal
skvidal at fedoraproject.org
Wed Sep 23 14:36:04 UTC 2009
On Wed, 23 Sep 2009, James Antill wrote:
> ---
> yum/yumRepo.py | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/yum/yumRepo.py b/yum/yumRepo.py
> index d860ef9..daf8095 100644
> --- a/yum/yumRepo.py
> +++ b/yum/yumRepo.py
> @@ -798,7 +798,7 @@ class YumRepository(Repository, config.RepoConf):
> )
> except URLGrabError, e:
> errstr = "failed to retrieve %s from %s\nerror was %s" % (relative, self.id, e)
> - if self.mirrorurls:
> + if hasattr(self, 'mirrorurls'):
> errstr +="\n You could try running: yum clean expire-cache"
> errstr +="\n To get a new set of mirrors."
why not just define: self.mirrorurls = [] in __init__() of YumRepository?
Same result and we don't have to remember that mirrorurls may not be
present.
-sv
More information about the Yum-devel
mailing list