On Tue, 2011-01-11 at 10:35 -0500, James Antill wrote: > 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 <ja...@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. >
IndexError, KeyError, ValueError I added instead. I was mainly concerned with trapping KeyboardInterrupt :( -sv _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel