Skip to content

Commit

Permalink
qubes/mgmt: mgmt.vm.property.Help
Browse files Browse the repository at this point in the history
  • Loading branch information
woju committed Feb 13, 2017
1 parent e8a5bc9 commit ada0437
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions qubes/mgmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,17 @@ def vm_property_get(self, untrusted_payload):
return 'default={} {}'.format(
str(self.dest.property_is_default(self.arg)),
self.repr(value))

def vm_property_help(self, untrusted_payload):
assert self.arg in self.dest.property_list()
assert not untrusted_payload
del untrusted_payload

self.fire_event_for_permission()

try:
doc = self.dest.property_get_def(self.arg).__doc__
except AttributeError:
return ''

return qubes.utils.format_doc(doc)

0 comments on commit ada0437

Please sign in to comment.