Author: eallen Date: 2011-03-03 14:34:57 +0000 (Thu, 03 Mar 2011) New Revision: 4569
Modified: trunk/cumin/python/cumin/objectselector.py Log: Handle None values when fromatting table columns of type KiB and MiB
Modified: trunk/cumin/python/cumin/objectselector.py =================================================================== --- trunk/cumin/python/cumin/objectselector.py 2011-03-03 14:07:10 UTC (rev 4568) +++ trunk/cumin/python/cumin/objectselector.py 2011-03-03 14:34:57 UTC (rev 4569) @@ -187,13 +187,13 @@ return "TableColumnHeader"
def fmt_b(self, value): - return fmt_bytes(value) + return value is not None and fmt_bytes(value) or None
def fmt_kb(self, value): - return fmt_bytes(value * 1024) + return value is not None and fmt_bytes(value * 1024) or None
def fmt_mb(self, value): - return fmt_bytes(value * 1024 * 1024) + return value is not None and fmt_bytes(value * 1024 * 1024) or None
class ObjectSelector(Form): def __init__(self, app, name, cls, object=None):
cumin-developers@lists.fedorahosted.org