Avoid none entries in VM state list
This commit is contained in:
parent
2002394a51
commit
2ff7a6865b
|
@ -159,6 +159,8 @@ def cli_cluster_status_format_pretty(CLI_CONFIG, data):
|
|||
|
||||
vms_strings = list()
|
||||
for state in vm_states:
|
||||
if data.get("vms", {}).get(state) is None:
|
||||
continue
|
||||
if state in ["start"]:
|
||||
state_colour = ansii["green"]
|
||||
elif state in ["migrate", "disable"]:
|
||||
|
|
Loading…
Reference in New Issue