Fix paramiko for non-ascii become password

Cherry-picked from a part of f24c10c32b
pull/18120/head
Toshio Kuratomi 8 years ago
parent 264b33da6b
commit 4ea3cd3a38

@ -308,7 +308,7 @@ class Connection(ConnectionBase):
if passprompt:
if self._play_context.become and self._play_context.become_pass:
chan.sendall(self._play_context.become_pass + '\n')
chan.sendall(to_bytes(self._play_context.become_pass, errors='strict') + b'\n')
else:
raise AnsibleError("A password is reqired but none was supplied")
else:

Loading…
Cancel
Save