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(+) (limited to 'paramiko/proxy.py') 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.1