Now provided by parted.Disk.getRaidPartitions() --- partedUtils.py | 6 ------ partitions.py | 2 +- raid.py | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/partedUtils.py b/partedUtils.py index 245b933..32a9f3e 100644 --- a/partedUtils.py +++ b/partedUtils.py @@ -159,12 +159,6 @@ def filter_partitions(disk, func): return rc -def get_raid_partitions(disk): - """Return a list of RAID-type PedPartition objects on disk.""" - func = lambda part: (part.is_active() - and part.get_flag(parted.PARTITION_RAID) == 1) - return filter_partitions(disk, func) - def get_lvm_partitions(disk): """Return a list of physical volume-type PedPartition objects on disk.""" func = lambda part: (part.is_active() diff --git a/partitions.py b/partitions.py index 94479a8..1f8c233 100644 --- a/partitions.py +++ b/partitions.py @@ -788,7 +788,7 @@ class Partitions: drives.sort() for drive in drives: disk = diskset.disks[drive] - for part in partedUtils.get_raid_partitions(disk): + for part in disk.getRaidPartitions(): partname = part.getDeviceNodeName() used = 0 for raid in raiddevs: diff --git a/raid.py b/raid.py index 0ff211c..5eb7cb9 100644 --- a/raid.py +++ b/raid.py @@ -76,7 +76,7 @@ def scanForRaid(drives): dev = parted.PedDevice.get("/dev/%s" % (d,)) disk = parted.PedDisk.new(dev) - raidParts = partedUtils.get_raid_partitions(disk) + raidParts = disk.getRaidPartitions() for part in raidParts: # if the part is encrypted, add the mapped dev instead pname = part.getDeviceNodeName() -- 1.6.1.3 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list