Re: [PATCH 1/3 v2] Add ntp module to facilitate NTP-related code

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

 



On Thu, 2012-05-31 at 11:24 -0400, Chris Lumens wrote:
> > +    try:
> > +        with open(conf_file_path, "r") as conf_file:
> > +            line = conf_file.readline()
> > +            while line:
> > +                match = srv_regexp.match(line)
> > +                if match:
> > +                    ret.append(match.group(1))
> > +
> > +                line = conf_file.readline()
> 
> I really thought there was a nicer way to handle exceptions when using
> the "with" statement, but I can't find anything in a quick search.  So,
> ACK.
Yeah, me too.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic

_______________________________________________
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