[master] [PATCH] Do not return None from Size.__str__ (#869405)

Vratislav Podzimek vpodzime at redhat.com
Mon Oct 29 09:47:51 UTC 2012


On Fri, 2012-10-26 at 14:03 -0400, Chris Lumens wrote:
> > __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.
> 
> I think this should be okay, provided the spinner in the custom storage
> spoke understands this value is out of the allowed range and does the
> right thing.
As can be seen in the bugreport exception is raised from the code
logging the input. With this patch "1 YB" is logged and everything works
as expected -- the maximal free space is used. Big numbers as Size are
not problem, the only problem is this __str__ method.

But thinking about it now I believe we should return the exact value in
YBs. There should be no need to return "1 YB". I'll send a new patch.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list