[PATCH 1/2] Catch NotImplementedError when scanning for disklabels (#566722)

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

 



This gets thrown by parted when it encounters a disklabel which it
recognizes but does not support, such as an AIX disklabel.
---
 storage/formats/disklabel.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/storage/formats/disklabel.py b/storage/formats/disklabel.py
index a9cdd00..3e78f27 100644
--- a/storage/formats/disklabel.py
+++ b/storage/formats/disklabel.py
@@ -130,7 +130,8 @@ class DiskLabel(DeviceFormat):
             if self.exists:
                 try:
                     self._partedDisk = parted.Disk(device=self.partedDevice)
-                except (_ped.DiskLabelException, _ped.IOException) as e:
+                except (_ped.DiskLabelException, _ped.IOException,
+                        NotImplementedError) as e:
                     raise InvalidDiskLabelError()
 
                 if self._partedDisk.type == "loop":
-- 
1.7.0

_______________________________________________
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