Re: [PATCH] pyparted changed the raised on disks whitout a label.

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

 



Looks good to me.

On Wed, 2009-03-11 at 18:19 +0100, Joel Granados Moreno wrote:
> ---
>  device.py |    9 +++++++--
>  1 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/device.py b/device.py
> index 8a6d0d9..f5ee2dc 100644
> --- a/device.py
> +++ b/device.py
> @@ -513,12 +513,13 @@ class MultiPath:
>      def buildPartMaps(self):
>          from maps import PartitionDeviceMap as _PartitionDeviceMap
>          import parted as _parted
> +        import _ped
>  
>          dev = self.PedDevice
>          dev.open()
>          try:
>              disk = _parted.Disk(dev)
> -        except _parted.DiskException, msg:
> +        except (_ped.DiskLabelException,_parted.DiskException), msg:
>              dev.close()
>              del dev
>              return
> @@ -538,6 +539,7 @@ class MultiPath:
>          del dev
>          del _PartitionDeviceMap
>          del _parted
> +        del _ped
>  
>      def buildParts(self):
>          import dm as _dm
> @@ -756,12 +758,14 @@ class RaidSet:
>      def buildParts(self):
>          from maps import PartitionDeviceMap as _PartitionDeviceMap
>          import parted as _parted
> +        import _ped
>  
>          dev = self.PedDevice
>          dev.open()
>          try:
>              disk = _parted.Disk(device=dev)
> -        except (_parted.DiskException,_parted.IOException), msg:
> +        except (_ped.DiskLabelException,
> +                        _parted.DiskException,_parted.IOException), msg:
>              dev.close()
>              del dev
>              return
> @@ -782,6 +786,7 @@ class RaidSet:
>          del dev
>          del _PartitionDeviceMap
>          del _parted
> +        del _ped
>  
>      def removeMemberParts(self):
>          for m in self.members:

_______________________________________________
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