Skip to content

Commit

Permalink
vm/adminvm: add stubs for kill/shutdown functions
Browse files Browse the repository at this point in the history
Report proper error message, instead of throwing AttributeError on such
calls.

Fixes QubesOS/qubes-issues#4645
  • Loading branch information
marmarek committed Feb 27, 2019
1 parent 318ed43 commit 5222650
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions qubes/vm/adminvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,22 @@ def suspend(self):
'''
raise qubes.exc.QubesVMError(self, 'Cannot suspend Dom0 fake domain!')

def shutdown(self):
'''Does nothing.
.. seealso:
:py:meth:`qubes.vm.qubesvm.QubesVM.shutdown`
'''
raise qubes.exc.QubesVMError(self, 'Cannot shutdown Dom0 fake domain!')

def kill(self):
'''Does nothing.
.. seealso:
:py:meth:`qubes.vm.qubesvm.QubesVM.kill`
'''
raise qubes.exc.QubesVMError(self, 'Cannot kill Dom0 fake domain!')

@property
def icon_path(self):
pass
Expand Down

0 comments on commit 5222650

Please sign in to comment.