Fixed DispVM handling in Template Manager

DispVMs are now correctly excluded from Template Manager.

fixes QubesOS/qubes-issues#4704
fixes QubesOS/qubes-issues#4703
这个提交包含在:
Marta Marczykowska-Górecka 2019-01-14 14:57:00 +01:00
父节点 3e01fd202e
当前提交 b7cf59c134
找不到此签名对应的密钥
GPG 密钥 ID: 9A752C30B26FD04B

查看文件

@ -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