Add get_pty named argument to SSHClient.exec_command() #115

Merged
merged 1 commit into from Feb 3, 2013

Projects

None yet

2 participants

@mvanderkolff
Contributor

Reason to do this is that saying:
sshCli = SSHClient()
sshCli.connect(....)
stdin,stdout,stderr = sshCli.exec_command("daemon_in_foreground",get_pty=True)
stdin.write('\x03') #^C
stdin.flush()

ends up killing the process as expected.

@bitprophet
Member

Sure; e.g. Fabric does this too (it uses Channel.exec_command directly, and beforehand, optionally uses Channel.get_pty as this patch does) for similar reasons. This will be useful for folks using this method call directly.

Thanks!

@bitprophet bitprophet merged commit 6b5d748 into paramiko:master Feb 3, 2013

1 check passed

default The Travis build passed
Details
@bitprophet bitprophet added a commit that referenced this pull request Feb 3, 2013
@bitprophet bitprophet Add changelog entry re #115 e761502
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment