You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2014/01/10 15:29:40 UTC
[2/2] git commit: Add a note / warning.
Add a note / warning.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/9b84bd03
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/9b84bd03
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/9b84bd03
Branch: refs/heads/trunk
Commit: 9b84bd0316b6b7846de8ff2c480700af0e122cf0
Parents: b6d79be
Author: Tomaz Muraus <to...@apache.org>
Authored: Fri Jan 10 15:29:22 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Jan 10 15:29:22 2014 +0100
----------------------------------------------------------------------
libcloud/compute/ssh.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/9b84bd03/libcloud/compute/ssh.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/ssh.py b/libcloud/compute/ssh.py
index ab186f2..b200238 100644
--- a/libcloud/compute/ssh.py
+++ b/libcloud/compute/ssh.py
@@ -284,9 +284,13 @@ class ParamikoSSHClient(BaseSSHClient):
stdin.close()
# Receive all the output
- # Note: This is used instead of chan.makefile approach to prevent
+ # Note #1: This is used instead of chan.makefile approach to prevent
# buffering issues and hanging if the executed command produces a lot
# of output.
+ #
+ # Note #2: If you are going to remove "ready" checks inside the loop
+ # you are going to have a bad time. Trying to consume from a channel
+ # which is not ready will block for indefinitely.
exit_status_ready = chan.exit_status_ready()
while not exit_status_ready: