diff options
author | Jeremy T. Bouse <jbouse@debian.org> | 2014-09-22 09:21:39 -0400 |
---|---|---|
committer | Jeremy T. Bouse <jbouse@debian.org> | 2014-09-22 09:21:39 -0400 |
commit | ccd643cdbd7ba752727d62051058a4454451414d (patch) | |
tree | 9bc89a6629132f474b3297735069d025145a965c /paramiko/proxy.py | |
parent | 588a4823436454e8968ee36ae95ff92e1cddc3f7 (diff) | |
download | python-paramiko-ccd643cdbd7ba752727d62051058a4454451414d.tar python-paramiko-ccd643cdbd7ba752727d62051058a4454451414d.tar.gz |
Imported Upstream version 1.15.0upstream/1.15.0
Diffstat (limited to 'paramiko/proxy.py')
-rw-r--r-- | paramiko/proxy.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/paramiko/proxy.py b/paramiko/proxy.py index 8959b24..0664ac6 100644 --- a/paramiko/proxy.py +++ b/paramiko/proxy.py @@ -26,9 +26,10 @@ from select import select import socket from paramiko.ssh_exception import ProxyCommandFailure +from paramiko.util import ClosingContextManager -class ProxyCommand(object): +class ProxyCommand(ClosingContextManager): """ Wraps a subprocess running ProxyCommand-driven programs. @@ -36,6 +37,8 @@ class ProxyCommand(object): `.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. + + Instances of this class may be used as context managers. """ def __init__(self, command_line): """ |