[PATCH 1/6] Check new target size against min size and max size.

Anne Mulhern amulhern at redhat.com
Wed Oct 29 12:04:10 UTC 2014





----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Tuesday, October 28, 2014 3:19:58 PM
> Subject: [PATCH 1/6] Check new target size against min size and max size.
> 
> ---
>  blivet/devices/storage.py | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/blivet/devices/storage.py b/blivet/devices/storage.py
> index e1ee390..531ab8c 100644
> --- a/blivet/devices/storage.py
> +++ b/blivet/devices/storage.py
> @@ -249,6 +249,10 @@ class StorageDevice(Device):
>              log.error("requested size %s is larger than maximum %s",
>                        newsize, self.maxSize)
>              raise ValueError("size is larger than the maximum for this
>              device")
> +        elif self.minSize and newsize < self.minSize:

This can be an if, not an elif (to match the gestalt of the rest of the method).

> +            log.error("requested size %s is smaller than minimum %s",
> +                      newsize, self.minSize)
> +            raise ValueError("size is smaller than the minimum for this
> device")
>  
>          self._targetSize = newsize
>  
> --
> 1.9.3
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

Otherwise, ack.

- mulhern


More information about the anaconda-patches mailing list