FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-09-2012, 08:43 PM
David Lehman
 
Default Fix Storage.getFreeSpace to return Size instances.

---
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:09 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org