Merge "Fix shell package."
This commit is contained in:
commit
7dd1a6de57
@ -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
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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():
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user