Avoid none entries in VM state list

This commit is contained in:
Joshua Boniface 2023-08-18 12:30:47 -04:00
parent 2002394a51
commit 2ff7a6865b
1 changed files with 2 additions and 0 deletions

View File

@ -159,6 +159,8 @@ def cli_cluster_status_format_pretty(CLI_CONFIG, data):
vms_strings = list() vms_strings = list()
for state in vm_states: for state in vm_states:
if data.get("vms", {}).get(state) is None:
continue
if state in ["start"]: if state in ["start"]:
state_colour = ansii["green"] state_colour = ansii["green"]
elif state in ["migrate", "disable"]: elif state in ["migrate", "disable"]: