Merge remote-tracking branch 'origin/pr/144'

* origin/pr/144:
  Fixed DispVM handling in Template Manager
This commit is contained in:
Marek Marczykowski-Górecki 2019-01-16 00:38:13 +01:00
commit 0410518d29
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -83,7 +83,8 @@ class TemplateManagerWindow(
self.change_all_combobox.addItem(template) self.change_all_combobox.addItem(template)
vms_with_templates = [vm for vm in self.qubes_app.domains vms_with_templates = [vm for vm in self.qubes_app.domains
if getattr(vm, 'template', None)] if getattr(vm, 'template', None) and
vm.klass != 'DispVM']
self.vm_list.setColumnCount(len(column_names)) self.vm_list.setColumnCount(len(column_names))
self.vm_list.setRowCount(len(vms_with_templates)) self.vm_list.setRowCount(len(vms_with_templates))
@ -127,7 +128,7 @@ class TemplateManagerWindow(
self.timers.remove(timer) self.timers.remove(timer)
try: try:
vm = self.qubes_app.domains[vm_name] vm = self.qubes_app.domains[vm_name]
if not getattr(vm, 'template', None): if not getattr(vm, 'template', None) or vm.klass == 'DispVM':
return return
except (exc.QubesException, KeyError): except (exc.QubesException, KeyError):
return # it was a dispVM that crashed on start return # it was a dispVM that crashed on start