[pykickstart/rhel6] Raise error on multiple clearpart commands (#852523)

Brian C. Lane bcl at redhat.com
Thu Jun 27 21:05:57 UTC 2013


From: "Brian C. Lane" <bcl at redhat.com>

---
 pykickstart/commands/clearpart.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pykickstart/commands/clearpart.py b/pykickstart/commands/clearpart.py
index 5d6276a..c2c14c7 100644
--- a/pykickstart/commands/clearpart.py
+++ b/pykickstart/commands/clearpart.py
@@ -81,6 +81,9 @@ class FC3_ClearPart(KickstartCommand):
         return op
 
     def parse(self, args):
+        if self.type is not None:
+            raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("clearpart already set"))
+
         (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
         self._setToSelf(self.op, opts)
         return self
-- 
1.8.1.4



More information about the anaconda-patches mailing list