Skip to content

Commit

Permalink
Correct misleading check_with_* docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarta committed Dec 27, 2023
1 parent 2c18f2c commit 344f59a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions qubes/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,26 @@ def _recursive_check(self, attr=None, *, feature, default,
raise KeyError(feature)

def check_with_template(self, feature, default=_NO_DEFAULT):
'''Check if the subject's template has the specified feature.'''
'''Check for the specified feature; if this VM does not have it,
it checks with its template.'''
return self._recursive_check('template',
feature=feature, default=default)

def check_with_netvm(self, feature, default=_NO_DEFAULT):
'''Check if the subject's netvm has the specified feature.'''
'''Check for the specified feature; if this VM does not have it,
it checks with its netvm.'''
return self._recursive_check('netvm',
feature=feature, default=default)

def check_with_adminvm(self, feature, default=_NO_DEFAULT):
'''Check if the AdminVM has the specified feature.'''
'''Check for the specified feature; if this VM does not have it,
it checks with the AdminVM.'''
return self._recursive_check(check_adminvm=True,
feature=feature, default=default)

def check_with_template_and_adminvm(self, feature, default=_NO_DEFAULT):
'''Check if the template and AdminVM has the specified feature.'''
'''Check for the specified feature; if this VM does not have it,
it checks with its template. If the template does not have it, it
checks with the AdminVM.'''
return self._recursive_check('template', check_adminvm=True,
feature=feature, default=default)

0 comments on commit 344f59a

Please sign in to comment.