aboutsummaryrefslogtreecommitdiff
path: root/paramiko/proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'paramiko/proxy.py')
-rw-r--r--paramiko/proxy.py5
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):
"""