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]

 



> +    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.

- Chris

_______________________________________________
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