[master] [PATCH] Do not return None from Size.__str__ (#869405)
Vratislav Podzimek
vpodzime at redhat.com
Wed Oct 24 10:18:22 UTC 2012
__str__ should never return None. If the value exceeds the maximum
size we are able to display, let's replace it with that maximum size.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/storage/size.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/storage/size.py b/pyanaconda/storage/size.py
index 757c97b..d86dc96 100644
--- a/pyanaconda/storage/size.py
+++ b/pyanaconda/storage/size.py
@@ -231,4 +231,5 @@ class Size(Decimal):
else:
return retval + " " + prefix + P_("byte", "bytes", newcheck)
- return None
+ # bigger than everything we have
+ return "1 " + _decimalPrefix[-1][2]
--
1.7.11.7
More information about the anaconda-patches
mailing list