fix NONE displayed for protogeni boot state
[sface.git] / sface / screens / mainscreen.py
index a435185..988d608 100644 (file)
@@ -630,9 +630,12 @@ class SliceWidget(QWidget):
                 if ("hardware_types" in node):
                     hardware_types = [x["name"] for x in node["hardware_types"]]
                     nodeType = ",".join(hardware_types)
+                nodeStatus = node.get("boot_state", "")
+                if nodeStatus == None:
+                    nodeStatus=""
                 nodeItem = self.nodeView.appendRow(networkItem,
                                node["component_name"],
-                               nodeStatus=node.get("boot_state", ""),
+                               nodeStatus=nodeStatus,
                                nodeType=nodeType,
                                membership=node_status['in'],
                                kind="node")
@@ -651,9 +654,12 @@ class SliceWidget(QWidget):
                 if ("hardware_types" in node):
                     hardware_types = [x["name"] for x in node["hardware_types"]]
                     nodeType = ",".join(hardware_types)
+                nodeStatus = node.get("boot_state", "")
+                if nodeStatus == None:
+                    nodeStatus=""
                 self.nodeView.appendRow(networkItem,
                                node["component_name"],
-                               nodeStatus = node.get("boot_state", ""),
+                               nodeStatus=nodeStatus,
                                nodeType=nodeType,
                                membership=node_status['out'],
                                kind="node")