[PATCH] Avoid polluting generated kickstarts by unexpected reqpart commands (#1164660)
Vratislav Podzimek
vpodzime at redhat.com
Wed Jul 1 12:31:56 UTC 2015
On Wed, 2015-07-01 at 14:10 +0200, Martin Kolman wrote:
> Only output the reqpart command if it is present in the data model.
> Otherwise it will unexpectedly show up in generated kickstarts.
>
> Related: rhbz#1164660
> Signed-off-by: Martin Kolman <mkolman at redhat.com>
> ---
> pykickstart/commands/reqpart.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/pykickstart/commands/reqpart.py b/pykickstart/commands/reqpart.py
> index 8ac07c2..d4e06b7 100644
> --- a/pykickstart/commands/reqpart.py
> +++ b/pykickstart/commands/reqpart.py
> @@ -45,7 +45,8 @@ class RHEL7_ReqPart(KickstartCommand):
>
> def __str__(self):
> retval = KickstartCommand.__str__(self)
> - retval += "reqpart%s\n" % self._getArgsAsStr()
> + if self.reqpart:
> + retval += "reqpart%s\n" % self._getArgsAsStr()
> return retval
>
> def _getParser(self):
ACK.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list