Commit b99477f9 by Szabolcs Gelencser

Catch UNKOWN state exceptions of VMs

parent 0fb681e6
...@@ -157,6 +157,7 @@ class Client: ...@@ -157,6 +157,7 @@ class Client:
group_name, vm_name.name, expand="instanceView" group_name, vm_name.name, expand="instanceView"
) )
try:
# get vm power state # get vm power state
vm_power_state = ( vm_power_state = (
status for status in vm.instance_view.statuses status for status in vm.instance_view.statuses
...@@ -165,6 +166,8 @@ class Client: ...@@ -165,6 +166,8 @@ class Client:
if(vm_power_state == "PowerState/running"): if(vm_power_state == "PowerState/running"):
running_virtual_machines.append(vm) running_virtual_machines.append(vm)
except:
pass
return running_virtual_machines return running_virtual_machines
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment