[PATCH] Avoid polluting generated kickstarts by unexpected reqpart commands (#1164660)
Martin Kolman
mkolman at redhat.com
Wed Jul 1 12:10:24 UTC 2015
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):
--
2.4.3
More information about the anaconda-patches
mailing list