summaryrefslogtreecommitdiff
path: root/paramiko
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2008-03-22 19:07:09 -0700
committerRobey Pointer <robey@lag.net>2008-03-22 19:07:09 -0700
commit7854d600a74179d5f92a2f382f01da10da99d4d5 (patch)
tree0888b4896fd57ec0a1c136530fe0b23864d8645b /paramiko
parentc0fc67acc9d5365c706057223880ba3f0c775d95 (diff)
downloadparamiko-7854d600a74179d5f92a2f382f01da10da99d4d5.tar.gz
[project @ robey@lag.net-20080323020709-ub8ya3xkh1ebywfa]
add exit_status_ready for justin cook.
Diffstat (limited to 'paramiko')
-rw-r--r--paramiko/channel.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/paramiko/channel.py b/paramiko/channel.py
index c1a26529..b331fbf9 100644
--- a/paramiko/channel.py
+++ b/paramiko/channel.py
@@ -265,6 +265,19 @@ class Channel (object):
self.transport._send_user_message(m)
self._wait_for_event()
+ def exit_status_ready(self):
+ """
+ Return true if the remote process has exited and returned an exit
+ status. You may use this to poll the process status if you don't
+ want to block in L{recv_exit_status}. Note that the server may not
+ return an exit status in some cases (like bad servers).
+
+ @return: True if L{recv_exit_status} will return immediately
+ @rtype: bool
+ @since: 1.7.3
+ """
+ return self.closed or self.status_event.isSet()
+
def recv_exit_status(self):
"""
Return the exit status from the process on the server. This is