[PATCH 3/3] Ignore partitions belonging to disks we've reinitialized.

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

 



---
 storage/devicetree.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 90a078e..e56aa07 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1100,6 +1100,12 @@ class DeviceTree(object):
                 log.error("failure scanning device %s" % disk_name)
                 return
 
+        # Check that the disk has partitions. If it does not, we must have
+        # reinitialized the disklabel.
+        if not getattr(disk.format, "partitions", None):
+            log.debug("ignoring partition %s" % name)
+            return
+
         try:
             device = PartitionDevice(name, sysfsPath=sysfs_path,
                                      major=udev_device_get_major(info),
-- 
1.6.0.6

_______________________________________________
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