backups: simplify getting dom0 object
This commit is contained in:
parent
92a6a85a4b
commit
d8a6e4a4b1
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user