backups: simplify getting dom0 object

This commit is contained in:
Marek Marczykowski-Górecki 2014-01-12 05:17:41 +01:00
parent 92a6a85a4b
commit d8a6e4a4b1
2 changed files with 2 additions and 8 deletions

View File

@ -69,10 +69,7 @@ class BackupVMsWindow(Ui_Backup, QWizard):
self.func_output = []
self.selected_vms = []
for vm in self.qvm_collection.values():
if vm.qid == 0:
self.vm = vm
break;
self.vm = self.qvm_collection[0]
assert self.vm != None

View File

@ -70,10 +70,7 @@ class RestoreVMsWindow(Ui_Restore, QWizard):
self.excluded = {}
for vm in self.qvm_collection.values():
if vm.qid == 0:
self.vm = vm
break;
self.vm = self.qvm_collection[0]
assert self.vm != None