Merge remote-tracking branch 'qubesos/pr/177'

* qubesos/pr/177:
  Use default_dispvm (not default_template) for new DispVM
This commit is contained in:
Marek Marczykowski-Górecki 2018-01-05 16:29:14 +01:00
commit a66c9afb18
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1184,6 +1184,9 @@ class Qubes(qubes.PropertyHolder):
# handle default template; specifically allow template=None (do not
# override it with default template)
if 'template' not in kwargs and hasattr(cls, 'template'):
if cls == self.get_vm_class('DispVM'):
kwargs['template'] = self.default_dispvm
else:
kwargs['template'] = self.default_template
elif 'template' in kwargs and isinstance(kwargs['template'], str):
kwargs['template'] = self.domains[kwargs['template']]