[pykickstart:master] Move some statically detectable kickstart errors out of anaconda (#1117908)
Anne Mulhern
amulhern at redhat.com
Wed Aug 20 20:57:52 UTC 2014
----- Original Message -----
> From: "Chris Lumens" <clumens at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Wednesday, August 20, 2014 4:53:05 PM
> Subject: Re: [pykickstart:master] Move some statically detectable kickstart errors out of anaconda (#1117908)
>
> > diff --git a/pykickstart/commands/logvol.py
> > b/pykickstart/commands/logvol.py
> > index f8d571a..9d96aea 100644
> > --- a/pykickstart/commands/logvol.py
> > +++ b/pykickstart/commands/logvol.py
> > @@ -472,4 +472,12 @@ class F20_LogVol(F18_LogVol):
> > errorMsg = _("The logvol and autopart commands can't be used
> > at the same time")
> > raise KickstartParseError(formatErrorMsg(self.lineno,
> > msg=errorMsg))
> >
> > + if not retval.preexist and not retval.percent and not retval.size:
> > + errorMsg = _("No size given for logical volume \"%s\". Use one
> > of --useexisting, --noformat, --size, or --percent." % self.name)
>
> Remember to do % outside of _() or the result will be a string that
> cannot ever be translated. Like this:
>
> _("Whatever %s") % self.thing
>
> - Chris
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
Whoops! Fixed.
- mulhern
More information about the anaconda-patches
mailing list