FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 10-22-2010, 11:20 AM
Martin Gracik
 
Default If there are any troubles reading the treeinfo file, return no addons.

Why is this read method called like that, instead of c.read(treeinfo)? It looks funny to me.
We can use ConfigParser.Error in the except clause to catch all ConfigParser errors.

--

Martin Gracik

----- "Ales Kozumplik" <akozumpl@redhat.com> wrote:

> Hi Chris,
>
> thanks for fixing this. One comment for this patch:
>
> On 10/21/2010 06:53 PM, Chris Lumens wrote:
> > + try:
> > + ConfigParser.read(c, treeinfo)
> > + variant = c.get("general", "variant")
> > + except:
> > + return retval
>
> We should get rid of all except: clauses without any exception,
> otherwise this code will sustain even SystemExit or KeyboardInterrupt.
> I
> suggest:
>
> except Exception as e:
> log.info("failed to parse treeinfo file: %s" % e)
> return retval
>
> or something.
>
> Ales
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 04:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org