nil check node resources to prevent panic

This commit is contained in:
Preetha Appan
2019-01-22 19:34:02 -06:00
parent 7e81a9e3c4
commit 77225d1d1a

View File

@@ -530,6 +530,9 @@ func (c *NodeStatusCommand) formatAttributes(node *api.Node) {
}
func (c *NodeStatusCommand) formatDeviceAttributes(node *api.Node) {
if node.NodeResources == nil {
return
}
devices := node.NodeResources.Devices
if len(devices) == 0 {
return