[yum-commits] Branch 'yum-3_2_X' - yum/yumRepo.py

James Antill james at fedoraproject.org
Tue Jan 11 15:36:06 UTC 2011


On Tue, 2011-01-11 at 10:02 -0500, seth vidal wrote:
> On Tue, 2011-01-11 at 14:51 +0000, James Antill wrote:
> > yum/yumRepo.py |    7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > New commits:
> > commit fd027e9f1e09c68745453a4c714f47e5de1accf8
> > Author: James Antill <james at and.org>
> > Date:   Tue Jan 11 09:10:28 2011 -0500
> > 
> >     Catch stupid errors from urlparse, who knows why. BZ 666826
> > 
> > diff --git a/yum/yumRepo.py b/yum/yumRepo.py
> > index 6a27805..36b7c7d 100644
> > --- a/yum/yumRepo.py
> > +++ b/yum/yumRepo.py
> > @@ -678,7 +678,12 @@ class YumRepository(Repository, config.RepoConf):
> >              url = parser.varReplace(url, self.yumvar)
> >              if url[-1] != '/':
> >                  url= url + '/'
> > -            (s,b,p,q,f,o) = urlparse.urlparse(url)
> > +            try:
> > +                # This started throwing ValueErrors, BZ 666826
> > +                (s,b,p,q,f,o) = urlparse.urlparse(url)
> > +            except:
> 
> 
> GLobal except? Really? Not just ValueError?

 I thought about just catching ValueError, but then thought "What do I
want to happen if anything else goes wrong in there?" so just caught
everything (esp. given that I didn't expect it to be throwing errors
anyway).
 I guess it's possible we could hide KeyboardError or MemoryError or
something ... pre-ACK if you want to change it.




More information about the Yum-commits mailing list