Re: PATCH: pyblock: pyparted now trhows an IOException when it does not recognize the part. table

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

 



> pyparted now trhows an IOException when it does not recognize the part. table,
> so catch that. This fixes the activation of dmraid sets with the new pyparted
> ---
>  device.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/device.py b/device.py
> index 2d26b52..1c0d7f3 100644
> --- a/device.py
> +++ b/device.py
> @@ -758,7 +758,7 @@ class RaidSet:
>          dev.open()
>          try:
>              disk = _parted.Disk(device=dev)
> -        except _parted.DiskException, msg:
> +        except (_parted.DiskException,_parted.IOException), msg:
>              dev.close()
>              del dev
>              return

Looks fine to me.  There's likely to be more of this sort of thing in
other places, too.  pyparted raises all sorts of new kinds of exceptions
now in an attempt to be more useful than "parted.error!  oh no!"

- Chris

_______________________________________________
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