def string_getter(x, attr): if x[1] is None: return "--" else: obj_attr = getattr(x[1], attr) if isinstance(obj_attr, (int, float, long, complex)): return utils.printable_decimal_and_hex(obj_attr) else: return obj_attr
def size(self): if self.project is None: return '--' else: return utils.printable_decimal_and_hex(self.project.size_blks)
def version(self): if self.project is None: return '--' else: return utils.printable_decimal_and_hex(self.project.version)