qubes/features: handle recursive templates
Have features.check_with_template() check the template recursively. The longest path (currently) is: DispVM -> AppVM -> TemplateVM.
This commit is contained in:
parent
8097da7cab
commit
b91714b204
@ -127,11 +127,8 @@ class Features(dict):
|
|||||||
return self[feature]
|
return self[feature]
|
||||||
|
|
||||||
if hasattr(self.vm, 'template') and self.vm.template is not None:
|
if hasattr(self.vm, 'template') and self.vm.template is not None:
|
||||||
try:
|
return self.vm.template.features.check_with_template(feature,
|
||||||
return self.vm.template.features[feature]
|
default)
|
||||||
except KeyError:
|
|
||||||
# handle default just below
|
|
||||||
pass
|
|
||||||
|
|
||||||
if default is self._NO_DEFAULT:
|
if default is self._NO_DEFAULT:
|
||||||
raise KeyError(feature)
|
raise KeyError(feature)
|
||||||
|
Loading…
Reference in New Issue
Block a user