Re: [pykickstart] [PATCH] Add --nontp option and a way to specify NTP servers to the timezone command | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On Thu, Jun 07, 2012 at 03:18:26PM +0200, Vratislav Podzimek wrote:
> +class F18_Timezone(FC6_Timezone):
> + def __init__(self, writePriority=0, *args, **kwargs):
> + FC6_Timezone.__init__(self, writePriority, *args, **kwargs)
> + self.op = self._getParser()
> + self.ntp = kwargs.get("ntp", False)
Shouldn't that be True?
> + self.ntp_servers = kwargs.get("ntp_servers", set())
> +
> + def __str__(self):
> + retval = FC6_Timezone.__str__(self)
> +
> + if self.ntp:
> + retval += "--ntp"
> +
> + return retval
> +
> + def _getParser(self):
> + op = FC6_Timezone._getParser(self)
> + op.add_option("--nontp", dest="nontp", action="store_true", default=False)
And hook this up to "ntp" and make the action store_false,
default=True then you don't end up with one variable instead of 2.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
Attachment:
pgp4DUTvucfrg.pgp
Description: PGP signature
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list
[Home] [Fedora Users] [Fedora Legacy List] [Fedora Maintainers] [Fedora Desktop] [Red Hat 9 Bible] [Fedora Bible] [Fedora SELinux] [Big List of Linux Books] [Yosemite News] [Yosemite Photos] [KDE Users] [Fedora Tools]