paramiko_ssh: fix crash upon pass prompt in py3
The pass prompt expects an answer and compares a `str` to a binary buffer, thus crashing.
It's an obvious fix to help transitioning towards Python3 and hopes it does not need a specific test.
(cherry picked from commit bc44175d8d
)
This commit is contained in:
parent
ca497b43e4
commit
9ee2065477
1 changed files with 1 additions and 1 deletions
|
@ -302,7 +302,7 @@ class Connection(ConnectionBase):
|
||||||
chunk = chan.recv(bufsize)
|
chunk = chan.recv(bufsize)
|
||||||
display.debug("chunk is: %s" % chunk)
|
display.debug("chunk is: %s" % chunk)
|
||||||
if not chunk:
|
if not chunk:
|
||||||
if 'unknown user' in become_output:
|
if b'unknown user' in become_output:
|
||||||
raise AnsibleError( 'user %s does not exist' % self._play_context.become_user)
|
raise AnsibleError( 'user %s does not exist' % self._play_context.become_user)
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue