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
5
pvc.py
5
pvc.py
|
@ -1339,10 +1339,11 @@ def get_vm_list(hypervisor, limit):
|
||||||
exit(1)
|
exit(1)
|
||||||
# Check hypervisor to avoid unneeded ZK calls
|
# Check hypervisor to avoid unneeded ZK calls
|
||||||
vm_hypervisor[vm] = zk_conn.get('/domains/{}/hypervisor'.format(vm))[0].decode('ascii')
|
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)
|
vm_list.append(vm)
|
||||||
else:
|
else:
|
||||||
vm_list.append(vm)
|
if vm_hypervisor[vm] == hypervisor:
|
||||||
|
vm_list.append(vm)
|
||||||
|
|
||||||
# Gather information for printing
|
# Gather information for printing
|
||||||
for vm in vm_list:
|
for vm in vm_list:
|
||||||
|
|
Loading…
Reference in New Issue