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

Brian C. Lane bcl at redhat.com
Thu Jun 27 22:04:28 UTC 2013


On Thu, Jun 27, 2013 at 05:13:02PM -0400, Chris Lumens wrote:
> > 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
> 
> In general, I don't like to make multiple instances of a kickstart
> command into errors.  This is so that kickstart files can make use of a
> %include to do some primitive form of inheritance - a site can use some
> generic base kickstart file, and then override directives later in more
> specific %includes.

Good point. What do you suggest we do about this bug then?

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20130627/856ae8d0/attachment.sig>


More information about the anaconda-patches mailing list