summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/proxy.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/paramiko/proxy.py b/paramiko/proxy.py
index d3ae436f..5f7f0023 100644
--- a/paramiko/proxy.py
+++ b/paramiko/proxy.py
@@ -107,5 +107,14 @@ class ProxyCommand(ClosingContextManager):
def close(self):
os.kill(self.process.pid, signal.SIGTERM)
+ @property
+ def closed(self):
+ return self.process.returncode is not None
+
+ @property
+ def _closed(self):
+ # Concession to Python 3 socket-like API
+ return self.closed
+
def settimeout(self, timeout):
self.timeout = timeout