From a0a575c7e24eccbe3cc18328e03bf23b0c2c3325 Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Mon, 11 Feb 2019 09:22:49 +0000 Subject: [PATCH] mgr/orchestrator: fix device pretty print with None attributes Signed-off-by: Ricardo Dias --- src/pybind/mgr/orchestrator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/orchestrator.py b/src/pybind/mgr/orchestrator.py index 2a1cb3218f1..0f5c12ee1f0 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): -- 2.39.5