Fix shell package.

Change-Id: I19eb817c7eb9a85c684c8f2f7a3735b6bde811af
This commit is contained in:
Federico Ressi 2019-07-05 04:22:21 +02:00
parent 9ec8e520bb
commit bbbfc91a01
4 changed files with 9 additions and 6 deletions

View File

@ -40,7 +40,7 @@ class ShellExecuteResult(object):
def execute(command, environment=None, timeout=None, shell=None,
stdin=True, stdout=True, stderr=True, ssh_client=None,
stdin=None, stdout=None, stderr=None, ssh_client=None,
expect_exit_status=0, **kwargs):
"""Execute command inside a remote or local shell

View File

@ -30,7 +30,7 @@ LOG = log.getLogger(__name__)
def local_execute(command, environment=None, timeout=None, shell=None,
stdin=True, stdout=True, stderr=True, expect_exit_status=0,
stdin=None, stdout=None, stderr=None, expect_exit_status=0,
**kwargs):
"""Execute command on local host using local shell"""
process = local_process(command=command,

View File

@ -330,8 +330,8 @@ class ShellProcessFixture(tobiko.SharedFixture):
LOG.debug("Command '%s' succeeded (exit_status=%d):\n"
"stdin:\n%s\n"
"stderr:\n%s\n"
"stdout:\n%s",
"stdout:\n%s\n"
"stderr:\n%s",
self.command, exit_status,
self.stdin, self.stdout, self.stderr)
@ -370,7 +370,10 @@ class ShellProcessTimeout(object):
def str_from_stream(stream):
return stream and str(stream) or None
if stream is not None:
return str(stream)
else:
return None
def default_shell_command():

View File

@ -29,7 +29,7 @@ LOG = log.getLogger(__name__)
def ssh_execute(ssh_client, command, environment=None, timeout=None,
stdin=True, stdout=True, stderr=True, shell=None,
stdin=None, stdout=None, stderr=None, shell=None,
expect_exit_status=0, **kwargs):
"""Execute command on local host using local shell"""
process = ssh_process(command=command,