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 60faffa5..260c6856 100644
--- a/sites/www/changelog.rst
+++ b/sites/www/changelog.rst
@@ -15,6 +15,10 @@ Changelog
``SSHException``. This moves the behavior in line with other "bad keys"
situations, re: Paramiko's main auth loop. Thanks to MengHuan Yu for the
patch.
+* :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