Fix listing bug in node info
Fixes a listing bug during 'node info -l' introduced in previous commit 4a3780cf as a "cleanup", and makes this a little more elegant. References #12
This commit is contained in:
parent
090929fdde
commit
61aef9fd3e
3
pvc.py
3
pvc.py
|
@ -1339,9 +1339,10 @@ def get_vm_list(hypervisor, limit):
|
|||
exit(1)
|
||||
# Check hypervisor to avoid unneeded ZK calls
|
||||
vm_hypervisor[vm] = zk_conn.get('/domains/{}/hypervisor'.format(vm))[0].decode('ascii')
|
||||
if hypervisor != None and vm_hypervisor[vm] == hypervisor:
|
||||
if hypervisor == None:
|
||||
vm_list.append(vm)
|
||||
else:
|
||||
if vm_hypervisor[vm] == hypervisor:
|
||||
vm_list.append(vm)
|
||||
|
||||
# Gather information for printing
|
||||
|
|
Loading…
Reference in New Issue