summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/proxy.py9
-rw-r--r--sites/www/changelog.rst4
2 files changed, 13 insertions, 0 deletions
diff --git a/paramiko/proxy.py b/paramiko/proxy.py
index 059ba83e..7d67680a 100644
--- a/paramiko/proxy.py
+++ b/paramiko/proxy.py
@@ -109,5 +109,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
diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst
index 7a0d534f..0af940ea 100644
--- a/sites/www/changelog.rst
+++ b/sites/www/changelog.rst
@@ -10,6 +10,10 @@ Changelog
network connectivity isn't timing out, but the remote server is otherwise
unable to service the connection in a timely manner. Credit to
``@sanseihappa``.
+* :bug:`789` Add a missing ``.closed`` attribute (plus ``._closed`` because
+ reasons) to `ProxyCommand <paramiko.proxy.ProxyCommand>` so the earlier
+ partial fix for :issue:`520` works in situations where one is gatewaying via
+ ``ProxyCommand``.
* :bug:`334` Make the ``subprocess`` import in ``proxy.py`` lazy so users on
platforms without it (such as Google App Engine) can import Paramiko
successfully. (Relatedly, make it easier to tweak an active socket check