From dc0f8c0a9e2347285d4fdbc158c35664c0280d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Tue, 20 Feb 2018 19:22:57 +0100 Subject: [PATCH] Fixed bug 3594 Incorrect targetVM display - dom0 was not included, and the code erroneously assumed that not only it is included, but also it's always the first in the dropdown. No more assumptions. fixes QubesOS/qubes-issues#3594 --- qubesmanager/backup.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qubesmanager/backup.py b/qubesmanager/backup.py index 27dcea1..1d4d6a6 100644 --- a/qubesmanager/backup.py +++ b/qubesmanager/backup.py @@ -101,8 +101,10 @@ class BackupVMsWindow(ui_backupdlg.Ui_Backup, multiselectwidget.QtGui.QWizard): self.qubes_app, None, self.qubes_app.domains['dom0'], - (lambda vm: vm.klass != 'TemplateVM' and vm.is_running()), - allow_internal=False, + filter_function=(lambda vm: + vm.klass != 'TemplateVM' + and vm.is_running() + and not vm.features.get('internal', False)), allow_default=False, allow_none=False ) @@ -236,7 +238,7 @@ class BackupVMsWindow(ui_backupdlg.Ui_Backup, multiselectwidget.QtGui.QWizard): None, self.tr("Wait!"), self.tr("Enter backup target location first.")) return False - if self.appvm_combobox.currentIndex() == 0 \ + if self.appvm_combobox.currentText() == "dom0" \ and not os.path.isdir(backup_location): QtGui.QMessageBox.information( None, self.tr("Wait!"),