If ssh died, it's an error, not a timeout

pull/13156/head
Abhijit Menon-Sen 9 years ago
parent 31b1abf580
commit 26ea9c4351

@ -411,6 +411,10 @@ class Connection(ConnectionBase):
if not rfd: if not rfd:
if state <= states.index('awaiting_escalation'): if state <= states.index('awaiting_escalation'):
# If the process has already exited, then it's not really a
# timeout; we'll let the normal error handling deal with it.
if p.poll() is not None:
break
self._terminate_process(p) self._terminate_process(p)
raise AnsibleError('Timeout (%ds) waiting for privilege escalation prompt: %s' % (timeout, stdout)) raise AnsibleError('Timeout (%ds) waiting for privilege escalation prompt: %s' % (timeout, stdout))

Loading…
Cancel
Save