On Tue, 2012-05-29 at 11:50 -0400, Chris Lumens wrote: > > +def save_servers_to_config(servers, conf_file_path=NTP_CONFIG_FILE, > > + srv_regexp=SRV_LINE_REGEXP, out_file_path=None): > > + """ > > + Replaces the servers defined in the chornyd's configuration file with > > + the given ones. If the out_file is not None, then it is used for the > > + resulting config. > > + > > + @type servers: iterable > > + @param out_file_path: path to the file used for the resulting config > > + > > + """ > > Little typo in the comment above - "chornyd's" -> "chronyd's". > > > + > > + old_conf_file = open(conf_file_path, "r") > > + if out_file_path: > > + new_conf_file = open(out_file_path, "w") > > + else: > > + (fildes, temp_path) = tempfile.mkstemp() > > + new_conf_file = os.fdopen(fildes, "w") > > You should handle the possibility that the opens could fail. > > - Chris Good catches both, thanks. I will fix this before pushing. -- 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