Merge "Fix shell package."

This commit is contained in:
Zuul 2019-07-05 04:05:45 +00:00 committed by Gerrit Code Review
commit 7dd1a6de57
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,