[PATCH 4/4] Not every device has a resizable attribute (#862972).

David Lehman dlehman at redhat.com
Mon Oct 8 15:36:43 UTC 2012


On Mon, 2012-10-08 at 11:11 -0400, Chris Lumens wrote:
> ---
>  pyanaconda/ui/gui/spokes/lib/resize.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py b/pyanaconda/ui/gui/spokes/lib/resize.py
> index fcccbeb..17bd15e 100644
> --- a/pyanaconda/ui/gui/spokes/lib/resize.py
> +++ b/pyanaconda/ui/gui/spokes/lib/resize.py
> @@ -124,7 +124,7 @@ class ResizeDialog(GUIObject):
>                      continue
>  
>                  # Devices that are not resizable are still deletable.
> -                if dev.resizable:
> +                if getattr(dev, "resizable", False):
>                      freeSize = dev.size - dev.minSize
>                  else:
>                      freeSize = dev.size

dev is None, which means the getDeviceByPath call didn't find a matching
device. You probably want to check for that right after that call, log
it, and continue.

Dave




More information about the anaconda-patches mailing list