[PATCH 3/9] Fix Storage.getFreeSpace to return Size instances.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 pyanaconda/storage/__init__.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 0c5ace3..132785b 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -708,6 +708,7 @@ class Storage(object):
             self.config.clearPartType.
         """
         from partitioning import shouldClear
+        from size import Size
         if disks is None:
             disks = self.disks
 
@@ -718,7 +719,7 @@ class Storage(object):
         for disk in [d for d in disks if d.partitioned]:
             should_clear = shouldClear(disk, clearPartType, [disk.name])
             if should_clear:
-                free[disk.name] = (disk.size, 0)
+                free[disk.name] = (Size(spec="%f mb" % disk.size), 0)
                 continue
 
             disk_free = 0
@@ -738,7 +739,8 @@ class Storage(object):
             elif hasattr(disk.format, "free"):
                 fs_free = disk.format.free
 
-            free[disk.name] = (disk_free, fs_free)
+            free[disk.name] = (Size(spec="%f mb" % disk_free),
+                               Size(spec="%f mb" % fs_free))
 
         return free
 
-- 
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux