From 228ed87e2f4b7314e4cfb67ee462550c5f20edef Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Sat, 30 Jul 2016 13:28:11 -0700 Subject: Untested fix re #789 --- paramiko/proxy.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v1.2.3 From 9c3e555001c5f670bd4d48dd6d6f529c1812d3f6 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 5 Dec 2016 19:55:55 -0800 Subject: Changelog re #789 --- sites/www/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index e4555e32..071bdd32 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -2,6 +2,10 @@ Changelog ========= +* :bug:`789` Add a missing ``.closed`` attribute (plus ``._closed`` because + reasons) to `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 -- cgit v1.2.3