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:
		
							
								
								
									
										5
									
								
								pvc.py
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								pvc.py
									
									
									
									
									
								
							| @@ -1339,10 +1339,11 @@ 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: | ||||
|             vm_list.append(vm) | ||||
|             if vm_hypervisor[vm] == hypervisor: | ||||
|                 vm_list.append(vm) | ||||
|  | ||||
|     # Gather information for printing | ||||
|     for vm in vm_list: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user