summaryrefslogtreecommitdiffstats
path: root/partedUtils.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-05-06 20:53:30 +0000
committerJeremy Katz <katzj@redhat.com>2002-05-06 20:53:30 +0000
commita4011c02f7a9aa6d8ccd2ff4943f285d55c833e5 (patch)
tree86dc00bcd1a3ae4b366d1009087aa96a8cb10493 /partedUtils.py
parent173cf8f24b3b781b36202d214af3d8eecfd483f3 (diff)
downloadanaconda-a4011c02f7a9aa6d8ccd2ff4943f285d55c833e5.tar.gz
anaconda-a4011c02f7a9aa6d8ccd2ff4943f285d55c833e5.tar.xz
anaconda-a4011c02f7a9aa6d8ccd2ff4943f285d55c833e5.zip
new function, get all partitions on the disk
Diffstat (limited to 'partedUtils.py')
-rw-r--r--partedUtils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/partedUtils.py b/partedUtils.py
index a61a15b48..661fc623d 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -177,6 +177,11 @@ def filter_partitions(disk, func):
return rc
+def get_all_partitions(disk):
+ """Return a list of all PedPartition objects on disk."""
+ func = lambda part: part.is_active()
+ return filter_partitions(disk, func)
+
def get_logical_partitions(disk):
"""Return a list of logical PedPartition objects on disk."""
func = lambda part: (part.is_active()