Fix up some broken usage of the Size class.
---
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._clearpartDev ices()) 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.clear PartType) 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_chil dren()[0] summary_label.set_markup(markup) -- 1.7.7.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list |
| All times are GMT. The time now is 03:34 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.