[rhel6-branch] Show ks lvm DeviceErrors in the UI (#880625)

Vratislav Podzimek vpodzime at redhat.com
Thu Jun 27 08:29:40 UTC 2013


On Wed, 2013-06-26 at 16:35 -0700, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl at redhat.com>
> 
> ---
>  kickstart.py | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/kickstart.py b/kickstart.py
> index c227822..6231d38 100644
> --- a/kickstart.py
> +++ b/kickstart.py
> @@ -560,13 +560,17 @@ class LogVolData(commands.logvol.RHEL6_LogVolData):
>              except KeyError:
>                  pass
>  
> -            request = storage.newLV(format=format,
> -                                    name=self.name,
> -                                    vg=vg,
> -                                    size=self.size,
> -                                    grow=self.grow,
> -                                    maxsize=self.maxSizeMB,
> -                                    percent=self.percent)
> +            try:
> +                request = storage.newLV(format=format,
> +                                        name=self.name,
> +                                        vg=vg,
> +                                        size=self.size,
> +                                        grow=self.grow,
> +                                        maxsize=self.maxSizeMB,
> +                                        percent=self.percent)
> +            except DeviceError as e:
> +                # Promote DeviceError to KickstartError so the UI will display it
> +                raise KickstartError(str(e))
>  
>              if self.fsprofile and hasattr(request.format, "fsprofile"):
>                  request.format.fsprofile = self.fsprofile
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list