[PATCH 2/2] Add --dirinstall command
Brian C. Lane
bcl at redhat.com
Thu Feb 7 19:47:35 UTC 2013
On Thu, Feb 07, 2013 at 11:42:01AM +0100, Vratislav Podzimek wrote:
> On Wed, 2013-02-06 at 16:26 -0800, Brian C. Lane wrote:
> > From: "Brian C. Lane" <bcl at redhat.com>
> > # setup ntp servers and start NTP daemon if not requested otherwise
> > - if (not flags.imageInstall) and anaconda.ksdata.timezone.ntpservers:
> > - ntp.save_servers_to_config(anaconda.ksdata.timezone.ntpservers)
> > + if not flags.imageInstall and not flags.dirInstall:
> > + if anaconda.ksdata.timezone.ntpservers:
> > + ntp.save_servers_to_config(anaconda.ksdata.timezone.ntpservers)
> I think using 'and \' is better than using two ifs as it saves
> indentation (which is good especially in this case of a long line
Actually, that was on purpose, it makes the following block easier to
read. note that the complete section now looks like:
if not flags.imageInstall and not flags.dirInstall:
if not anaconda.ksdata.timezone.nontp:
It would be redundant to repeat the test for the chronyd check which is now included in the block.
> Also I believe pyanaconda.flags.can_touch_runtime_system should be
I think you're right. For some reason I was thinking that would cover too much but I think it would be ok.
So I'd replace the above *Install checks with can_touch_runtime. I'll
send an intermediate patch that will get squashed into the final one.
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 482 bytes
Desc: not available
More information about the anaconda-patches