vm: restore force_shutdown->kill deprecated alias

Apparently there are still users of this function - qubes manager.
This commit is contained in:
Marek Marczykowski-Górecki 2018-02-13 19:01:29 +01:00
parent 7f286766d0
commit 24cfb4a581
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -23,6 +23,7 @@
import logging import logging
import subprocess import subprocess
import warnings
import qubesadmin.base import qubesadmin.base
import qubesadmin.exc import qubesadmin.exc
@ -118,6 +119,13 @@ class QubesVM(qubesadmin.base.PropertyHolder):
''' '''
self.qubesd_call(self._method_dest, 'admin.vm.Kill') self.qubesd_call(self._method_dest, 'admin.vm.Kill')
def force_shutdown(self):
'''Deprecated alias for :py:meth:`kill`'''
warnings.warn(
'Call to deprecated function force_shutdown(), use kill() instead',
DeprecationWarning, stacklevel=2)
return self.kill()
def pause(self): def pause(self):
''' '''
Pause domain. Pause domain.