summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-01-26 14:28:14 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-02-12 11:29:04 -1000
commit2e45528eefe7247db8b2ee9d7080d7b223d40490 (patch)
tree27943cfe513e12ab963468ca7e463679d5bbc362
parent4769f87a09f0d94d4a3b56ca22b425d0b906f8dd (diff)
downloadanaconda-2e45528eefe7247db8b2ee9d7080d7b223d40490.tar.gz
anaconda-2e45528eefe7247db8b2ee9d7080d7b223d40490.tar.xz
anaconda-2e45528eefe7247db8b2ee9d7080d7b223d40490.zip
Removed partedUtils.get_primary_partitions()
Now provided by parted.Disk.getPrimaryPartitions()
-rw-r--r--autopart.py4
-rw-r--r--partedUtils.py5
2 files changed, 2 insertions, 7 deletions
diff --git a/autopart.py b/autopart.py
index 4bf191a5c..31f6b9c29 100644
--- a/autopart.py
+++ b/autopart.py
@@ -160,7 +160,7 @@ def findFreespace(diskset):
def bestPartType(disk, request):
- numPrimary = len(partedUtils.get_primary_partitions(disk))
+ numPrimary = len(disk.getPrimaryPartitions())
maxPrimary = disk.max_primary_partition_count
if numPrimary == maxPrimary:
raise PartitioningError, "Unable to create additional primary partitions on /dev/%s" % (disk.dev.path[5:])
@@ -357,7 +357,7 @@ def fitSized(diskset, requests, primOnly = 0, newParts = None):
break
## print("Trying drive", drive)
disk = diskset.disks[drive]
- numPrimary = len(partedUtils.get_primary_partitions(disk))
+ numPrimary = len(disk.getPrimaryPartitions())
numLogical = len(disk.getLogicalPartitions())
# if there is an extended partition add it in
diff --git a/partedUtils.py b/partedUtils.py
index 40319ae48..01730a51f 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -163,11 +163,6 @@ def filter_partitions(disk, func):
return rc
-def get_primary_partitions(disk):
- """Return a list of primary PedPartition objects on disk."""
- func = lambda part: part.type == parted.PARTITION_PRIMARY
- return filter_partitions(disk, func)
-
def get_raid_partitions(disk):
"""Return a list of RAID-type PedPartition objects on disk."""
func = lambda part: (part.is_active()