Re: [PATCH 2/2] If there are any troubles reading the treeinfo file, return no addons.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 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@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

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


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux