[anaconda 2/2] Remove some leftover float conversions.

David Shea dshea at redhat.com
Thu Jan 16 01:39:35 UTC 2014


These Sizes can be initialized with bytes=
---
 pyanaconda/ui/lib/space.py          | 2 +-
 pyanaconda/ui/tui/spokes/storage.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/lib/space.py b/pyanaconda/ui/lib/space.py
index 8a45022..18ffe7f 100644
--- a/pyanaconda/ui/lib/space.py
+++ b/pyanaconda/ui/lib/space.py
@@ -71,7 +71,7 @@ class FileSystemSpaceChecker(object):
                             in the info bar at the bottom of a Hub.
         """
         self.reset()
-        free = Size(en_spec="%.2f MB" % self.storage.fileSystemFreeSpace)
+        free = Size(bytes=self.storage.fileSystemFreeSpace)
         needed = self.payload.spaceRequired
         log.info("fs space: %s  needed: %s", free, needed)
         self.success = (free >= needed)
diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py
index a597783..8cee434 100644
--- a/pyanaconda/ui/tui/spokes/storage.py
+++ b/pyanaconda/ui/tui/spokes/storage.py
@@ -157,7 +157,7 @@ class StorageSpoke(NormalTUISpoke):
 
         summary = (P_(("%d disk selected; %s capacity; %s free ..."),
                       ("%d disks selected; %s capacity; %s free ..."),
-                      count) % (count, str(Size(en_spec="%f MB" % capacity)), free))
+                      count) % (count, str(Size(bytes=capacity)), free))
 
         if len(self.disks) == 0:
             summary = _("No disks detected.  Please shut down the computer, connect at least one disk, and restart to complete installation.")
-- 
1.8.4.2



More information about the anaconda-patches mailing list