Add missing docstrings

This commit is contained in:
Pawel Marczewski 2020-01-16 09:52:06 +01:00
parent 023f2f593c
commit 88f177f564
No known key found for this signature in database
GPG Key ID: DE42EE9B14F96465

View File

@ -187,9 +187,13 @@ class QubesVM(qubesadmin.base.PropertyHolder):
return 'NA'
def get_mem(self):
'''Get current memory usage from VM.'''
return int(self._get_current_state()['mem'])
def _get_current_state(self):
'''Call admin.vm.CurrentState, and return the result as a dict.'''
state = {}
response = self.qubesd_call(self._method_dest, 'admin.vm.CurrentState')
for part in response.decode('ascii').split():