From 7b2590b6d72fc862e669dce4b4a68d9bcf9302c3 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Fri, 23 Jan 2009 15:15:09 -1000 Subject: 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. --- iw/autopart_type.py | 2 +- iw/bootloader_main_gui.py | 2 +- iw/partition_gui.py | 2 +- iw/partition_ui_helpers_gui.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'iw') 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: -- cgit