vm/adminvm: add stubs for kill/shutdown functions

Report proper error message, instead of throwing AttributeError on such
calls.

Fixes QubesOS/qubes-issues#4645
This commit is contained in:
Marek Marczykowski-Górecki 2019-02-19 15:25:05 +01:00
parent 318ed439ff
commit 5222650868
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -178,6 +178,22 @@ class AdminVM(qubes.vm.BaseVM):
'''
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