qvm-ls: fix handling VM list on command line

This commit is contained in:
Marek Marczykowski-Górecki 2016-06-24 23:05:15 +02:00
parent 776393e97b
commit 84677fa70b
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -190,7 +190,7 @@ def main():
vms_list = [vm for vm in qvm_collection.values()]
#assume VMs are presented in desired order:
if len(arguments.VMs) > 0:
vms_list = [vm for vm in vms_list if vm.name in arguments.VMs]
vms_to_display = [vm for vm in vms_list if vm.name in arguments.VMs]
#otherwise, format them accordingly:
else:
no_vms = len (vms_list)