From 9700d9c04fc492fb4987f9d458009e84e8bffacf Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Wed, 23 Sep 2015 22:32:15 +0530 Subject: [PATCH] Fix typo in checking select results It's possible for more than one fd to be set, so 'elif' is obviously not the right thing to use. --- lib/ansible/plugins/connection/ssh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index f8fca1bd29..cfc51619e2 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -460,14 +460,14 @@ class Connection(ConnectionBase): # Read whatever output is available on stdout and stderr, and stop # listening to the pipe if it's been closed. - elif p.stdout in rfd: + if p.stdout in rfd: chunk = p.stdout.read() if chunk == '': rpipes.remove(p.stdout) tmp_stdout += chunk #self._display.debug("stdout chunk (state=%s):\n>>>%s<<<\n" % (state, chunk)) - elif p.stderr in rfd: + if p.stderr in rfd: chunk = p.stderr.read() if chunk == '': rpipes.remove(p.stderr)