diff --git a/qubesmanager/backup.py b/qubesmanager/backup.py index f21fa13..f44e36e 100644 --- a/qubesmanager/backup.py +++ b/qubesmanager/backup.py @@ -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 diff --git a/qubesmanager/restore.py b/qubesmanager/restore.py index 8e5db99..2c1f3c7 100644 --- a/qubesmanager/restore.py +++ b/qubesmanager/restore.py @@ -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