Avoid setting get_pty=False in ssh_connection.send()
get_pty=False is causing issues in ssh_connection.send(). The class will not avoid passing the parameter if it isn't needed. Change-Id: Ib373d10a0bf63cedb46d176396e0f39e5ca0e95c Signed-off-by: croy <Christian.Roy@windriver.com>
This commit is contained in:
@@ -261,7 +261,10 @@ class SSHConnection:
|
||||
"""
|
||||
get_logger().log_ssh(cmd)
|
||||
|
||||
stdin, stdout, stderr = self.client.exec_command(cmd, timeout=timeout, get_pty=get_pty)
|
||||
if get_pty:
|
||||
stdin, stdout, stderr = self.client.exec_command(cmd, timeout=timeout, get_pty=True)
|
||||
else: # Sending get_pty=False causes issues with Paramiko timeouts.
|
||||
stdin, stdout, stderr = self.client.exec_command(cmd, timeout=timeout)
|
||||
|
||||
stdout.channel.set_combine_stderr(True)
|
||||
self.last_return_code = stdout.channel.recv_exit_status()
|
||||
|
||||
Reference in New Issue
Block a user