]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orchestrator: fix device pretty print with None attributes
authorRicardo Dias <rdias@suse.com>
Mon, 11 Feb 2019 09:22:49 +0000 (09:22 +0000)
committerRicardo Dias <rdias@suse.com>
Mon, 11 Feb 2019 09:24:43 +0000 (09:24 +0000)
Signed-off-by: Ricardo Dias <rdias@suse.com>
src/pybind/mgr/orchestrator.py

index 2a1cb3218f1312c828e01d9f97d1d601869bdf7b..0f5c12ee1f0924864a4b311047975b0359934332 100644 (file)
@@ -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):