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 <[email protected]> Authored: Fri Jan 10 15:29:22 2014 +0100 Committer: Tomaz Muraus <[email protected]> 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:
