From ca6cc8e01f30223ae0fb0b1265a5157af207283b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 7 Jun 2014 04:40:24 +0200 Subject: [PATCH] create-vm: Handle the case when no HVM-template exists --- qubesmanager/create_new_vm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qubesmanager/create_new_vm.py b/qubesmanager/create_new_vm.py index 42243cd..4c35e42 100644 --- a/qubesmanager/create_new_vm.py +++ b/qubesmanager/create_new_vm.py @@ -194,6 +194,9 @@ class NewVmDlg (QDialog, Ui_NewVMDlg): template_vm = None if self.template_name.isEnabled(): + if len(self.template_vm_list) == 0: + QMessageBox.warning (None, "No template available!", "Cannot create non-standalone VM when no compatible template exists. Create template VM first or choose to create standalone VM.") + return template_vm = self.template_vm_list[self.template_name.currentIndex()] netvm = None