From: Ricardo Dias Date: Mon, 11 Feb 2019 09:22:49 +0000 (+0000) Subject: mgr/orchestrator: fix device pretty print with None attributes X-Git-Tag: v14.1.0~141^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a0a575c7e24eccbe3cc18328e03bf23b0c2c3325;p=ceph.git mgr/orchestrator: fix device pretty print with None attributes Signed-off-by: Ricardo Dias --- diff --git a/src/pybind/mgr/orchestrator.py b/src/pybind/mgr/orchestrator.py index 2a1cb3218f13..0f5c12ee1f09 100644 --- a/src/pybind/mgr/orchestrator.py +++ b/src/pybind/mgr/orchestrator.py @@ -788,9 +788,10 @@ class InventoryDevice(object): return row_format.format("Device Path", "Type", "Size", "Rotates", "Available", "Model") else: - return row_format.format(self.id, self.type, format_bytes(self.size, 5, colored=False), + return row_format.format(self.id, self.type if self.type is not None else "", + format_bytes(self.size, 5, colored=False), str(self.rotates), str(self.available), - self.dev_id) + self.dev_id if self.dev_id is not None else "") class InventoryNode(object):