Remove leftovers from QubesVM.run_for_stdio() refactoring

We no longer use qubes.VMShell there.
This commit is contained in:
Pawel Marczewski 2020-01-24 16:59:20 +01:00
parent 08d83fb241
commit e8baf2a157
No known key found for this signature in database
GPG Key ID: DE42EE9B14F96465

View File

@ -1449,14 +1449,6 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
return stdouterr return stdouterr
@staticmethod
def _prepare_input_for_vmshell(command, input):
"""Prepare shell input for the given command and optional (real) input
""" # pylint: disable=redefined-builtin
if input is None:
input = b''
return b''.join((command.rstrip('\n').encode('utf-8'), b'\n', input))
def run(self, command, user=None, **kwargs): def run(self, command, user=None, **kwargs):
"""Run a shell command inside the domain using qrexec. """Run a shell command inside the domain using qrexec.
@ -1474,12 +1466,9 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
@asyncio.coroutine @asyncio.coroutine
def run_for_stdio(self, *args, input=None, **kwargs): def run_for_stdio(self, *args, input=None, **kwargs):
"""Run a shell command inside the domain using qubes.VMShell qrexec. """Run a shell command inside the domain using qrexec.
This method is a coroutine. This method is a coroutine.
*kwargs* are passed verbatim to :py:meth:`run_service_for_stdio`.
See disclaimer there.
""" # pylint: disable=redefined-builtin """ # pylint: disable=redefined-builtin
kwargs.setdefault('stdin', subprocess.PIPE) kwargs.setdefault('stdin', subprocess.PIPE)