[pykickstart:rhel7] Move some statically detectable kickstart errors out of anaconda (#1117908)

Chris Lumens clumens at redhat.com
Wed Aug 20 18:30:56 UTC 2014


> diff --git a/pykickstart/commands/logvol.py b/pykickstart/commands/logvol.py
> index 6122f42..d4053c7 100644
> --- a/pykickstart/commands/logvol.py
> +++ b/pykickstart/commands/logvol.py
> @@ -472,4 +472,10 @@ 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:
> +            raise KickstartParseError(formatErrorMsg(self.lineno, msg="Size required"))
> +
> +        if retval.percent is not None and (retval.percent < 0 or retval.percent > 100):
> +            raise KickstartValueError(formatErrorMsg(self.lineno, msg="Percentage must be between 0 and 100"))
> +
>          return retval

Might as well mark these errors for translation.

- Chris


More information about the anaconda-patches mailing list