diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2009-08-17 14:04:53 +0200 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2009-08-17 14:07:58 +0200 |
commit | 49a8bb6b8b6dbf154403e54f6309abe53779fbaf (patch) | |
tree | 39d4098d37a5610962e206ee706da86a766a32e6 /plugins | |
parent | 1b6792e8b1adbb8d8024c10aaa7a0471f2a8d503 (diff) | |
download | firstaidkit-49a8bb6b8b6dbf154403e54f6309abe53779fbaf.tar.gz firstaidkit-49a8bb6b8b6dbf154403e54f6309abe53779fbaf.tar.xz firstaidkit-49a8bb6b8b6dbf154403e54f6309abe53779fbaf.zip |
pyparted changed its API.
* plugins/grub/grubUtils.py (is_dev_in_ignored): Change the parted calls
to reflect the pyparted API changes.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/grub/grubUtils.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/grub/grubUtils.py b/plugins/grub/grubUtils.py index 7488b87..474aced 100644 --- a/plugins/grub/grubUtils.py +++ b/plugins/grub/grubUtils.py @@ -70,14 +70,14 @@ def get_all_devs(): try: # parted will provide us with all the partitions. partitions = [] - parteddev = parted.PedDevice.get(device["device"]) - disk = parted.PedDisk.new(parteddev) - part = disk.next_partition() - while part: - if part.num > 0: + parteddev = parted.getDevice(device["device"]) + disk = parted.Disk(parteddev) + for part in disk.partitions: + if part.type == parted.PARTITION_EXTENDED \ + or part.type == parted.PARTITION_NORMAL \ + or part.type == parted.PARTITION_LOGICAL: partitions.append( - Dname("%s%s"%(device["device"],part.num))) - part = disk.next_partition(part) + Dname("%s%s"%(device["device"],part.number))) # The key will be the device name and it will contain a list of # parts. This is very unfortunate as the object would be better # sutied as a key. |