Re: [PATCH 5/6] Not all FileDevices have parents, so don't assume.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2009-03-23 at 10:46 -0400, Chris Lumens wrote:
> ---
>  storage/devices.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/storage/devices.py b/storage/devices.py
> index c74e895..55eed56 100644
> --- a/storage/devices.py
> +++ b/storage/devices.py
> @@ -2534,7 +2534,7 @@ class FileDevice(StorageDevice):
>          root = ""
>          try:
>              status = self.parents[0].format.status
> -        except AttributeError:
> +        except:
>              status = False

It would still be better to except (AttributeError, IndexError) or, at
the very most, Exception.

>  
>          if status: 

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux