diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2014-03-03 18:24:04 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-03-03 18:24:04 -0800 |
commit | 72a73f55fae697fe3b940f378664a7c58214647f (patch) | |
tree | 553609aaa777980503536d76f074b74e1a3551ba /paramiko/proxy.py | |
parent | 4e9af2f7ca91613ea4c60ca22b96adc2247b1ba2 (diff) | |
parent | c0fcd11ea0074d8cd019ed7087282754ea3ff792 (diff) | |
download | paramiko-72a73f55fae697fe3b940f378664a7c58214647f.tar.gz |
Merge branch '1.10' into 1.11
Conflicts:
fabfile.py
paramiko/__init__.py
Diffstat (limited to 'paramiko/proxy.py')
-rw-r--r-- | paramiko/proxy.py | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/paramiko/proxy.py b/paramiko/proxy.py index 3f5c8bb2..10f0728f 100644 --- a/paramiko/proxy.py +++ b/paramiko/proxy.py @@ -16,9 +16,6 @@ # along with Paramiko; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -""" -L{ProxyCommand}. -""" from datetime import datetime import os @@ -36,18 +33,17 @@ class ProxyCommand(object): Wraps a subprocess running ProxyCommand-driven programs. This class implements a the socket-like interface needed by the - L{Transport} and L{Packetizer} classes. Using this class instead of a + `.Transport` and `.Packetizer` classes. Using this class instead of a regular socket makes it possible to talk with a Popen'd command that will proxy traffic between the client and a server hosted in another machine. """ def __init__(self, command_line): """ Create a new CommandProxy instance. The instance created by this - class can be passed as an argument to the L{Transport} class. + class can be passed as an argument to the `.Transport` class. - @param command_line: the command that should be executed and - used as the proxy. - @type command_line: str + :param str command_line: + the command that should be executed and used as the proxy. """ self.cmd = shlsplit(command_line) self.process = Popen(self.cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE) @@ -59,8 +55,7 @@ class ProxyCommand(object): Write the content received from the SSH client to the standard input of the forked command. - @param content: string to be sent to the forked command - @type content: str + :param str content: string to be sent to the forked command """ try: self.process.stdin.write(content) @@ -76,11 +71,9 @@ class ProxyCommand(object): """ Read from the standard output of the forked program. - @param size: how many chars should be read - @type size: int + :param int size: how many chars should be read - @return: the length of the read content - @rtype: int + :return: the length of the read content, as an `int` """ try: start = datetime.now() |