[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: PATCH: pyblock: pyparted now trhows an IOException when it does not recognize the part. table
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Subject: Re: PATCH: pyblock: pyparted now trhows an IOException when it does not recognize the part. table
- Date: Tue, 17 Feb 2009 11:38:37 -0500
> 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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]