[PATCH 3/4] Fix up some broken usage of the Size class.

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

 



---
 pyanaconda/ui/gui/spokes/custom.py  |    4 ++--
 pyanaconda/ui/gui/spokes/storage.py |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 92ed1e6..f43d8c2 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -192,14 +192,14 @@ class CustomPartitioningSpoke(NormalSpoke):
 
     def _currentFreeSpace(self):
         """Add up all the free space on selected disks and return it as a Size."""
-        totalFree = 0
+        totalFree = Size(bytes=0)
 
         freeDisks = self.storage.getFreeSpace(disks=self._clearpartDevices())
         for tup in freeDisks.values():
             for chunk in tup:
                 totalFree += chunk
 
-        return Size(totalFree)
+        return totalFree
 
     def _currentTotalSpace(self):
         """Add up the sizes of all selected disks and return it as a Size."""
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 37aa1e3..aa9c3ae 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -393,7 +393,7 @@ class StorageSpoke(NormalSpoke):
         print "UPDATING SUMMARY"
         count = 0
         capacity = 0
-        free = 0
+        free = Size(bytes=0)
 
         free_space = self.storage.getFreeSpace(clearPartType=self.clearPartType)
         selected = [d for d in self.disks if d.name in self.selected_disks]
@@ -405,7 +405,7 @@ class StorageSpoke(NormalSpoke):
 
         summary = (P_(("%d disk selected; %s capacity; %s free ..."),
                       ("%d disks selected; %s capacity; %s free ..."),
-                      count) % (count, str(Size(spec="%s MB" % capacity)), str(Size(free))))
+                      count) % (count, str(Size(spec="%s MB" % capacity)), free))
         markup = "<span foreground='blue'><u>%s</u></span>" % summary
         summary_label = self.builder.get_object("summary_button").get_children()[0]
         summary_label.set_markup(markup)
-- 
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