summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-01-23 15:15:09 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-02-12 11:28:38 -1000
commit7b2590b6d72fc862e669dce4b4a68d9bcf9302c3 (patch)
tree6496e90014b900c15e7cb8f5688c9375a9316259 /iw
parent6da8a87f7b941fc3b240ab55cdd6ab5b778eedae (diff)
downloadanaconda-7b2590b6d72fc862e669dce4b4a68d9bcf9302c3.tar.gz
anaconda-7b2590b6d72fc862e669dce4b4a68d9bcf9302c3.tar.xz
anaconda-7b2590b6d72fc862e669dce4b4a68d9bcf9302c3.zip
Removed partedUtils.getDeviceSizeMB(), functionality now in pyparted.
The parted.Device object now provides a getSize() method to return the size of the device in a human-readable format.
Diffstat (limited to 'iw')
-rw-r--r--iw/autopart_type.py2
-rw-r--r--iw/bootloader_main_gui.py2
-rw-r--r--iw/partition_gui.py2
-rw-r--r--iw/partition_ui_helpers_gui.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/iw/autopart_type.py b/iw/autopart_type.py
index 3b3668282..d9ccb607f 100644
--- a/iw/autopart_type.py
+++ b/iw/autopart_type.py
@@ -384,7 +384,7 @@ class PartitionTypeWindow(InstallWindow):
for disk in self.diskset.disks.values():
if not disk.dev.path[5:] in self.anaconda.id.bootloader.drivelist:
continue
- size = partedUtils.getDeviceSizeMB(disk.dev)
+ size = disk.dev.getSize(unit="MB")
dispstr = "%s %8.0f MB %s" %(disk.dev.path[5:], size, disk.dev.model)
i = bootstore.append(None)
bootstore[i] = (dispstr, disk.dev.path[5:])
diff --git a/iw/bootloader_main_gui.py b/iw/bootloader_main_gui.py
index 11cb7601b..615d0560a 100644
--- a/iw/bootloader_main_gui.py
+++ b/iw/bootloader_main_gui.py
@@ -97,7 +97,7 @@ class MainBootloaderWindow(InstallWindow):
keys.sort()
for d in keys:
- size = partedUtils.getDeviceSizeMB(disks[d].dev)
+ size = disks[d].dev.getSize(unit="MB")
m = disks[d].dev.model
i = model.append(None)
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index b2c11fd55..5bf359e1e 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -326,7 +326,7 @@ class DiskStripeGraph:
else:
drivetext = _("Drive %s (%-0.f MB) "
"(Model: %s)") % ('/dev/' + drive,
- partedUtils.getDeviceSizeMB(disk.dev),
+ disk.dev.getSize(unit="MB"),
disk.dev.model)
diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py
index a08da7248..c2c491b6c 100644
--- a/iw/partition_ui_helpers_gui.py
+++ b/iw/partition_ui_helpers_gui.py
@@ -137,7 +137,7 @@ def createAllowedDrivesStore(disks, reqdrives, drivelist, selectDrives=True,
drives = disks.keys()
drives.sort()
for drive in drives:
- size = getDeviceSizeMB(disks[drive].dev)
+ size = disks[drive].dev.getSize(unit="MB")
selected = 0
if selectDrives: