diff options
author | Nathaniel Case <this.is@nathanielca.se> | 2017-07-05 20:07:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-05 20:07:26 +0200 |
commit | 28c6b226c75b3677eb6f489c11b72cceee1cdfe4 (patch) | |
tree | 01530f885c9f1b9a2df49c57f851df5e880954f4 /bin | |
parent | enabled vyos banner and config (#26438) (diff) | |
download | ansible-28c6b226c75b3677eb6f489c11b72cceee1cdfe4.tar.xz ansible-28c6b226c75b3677eb6f489c11b72cceee1cdfe4.zip |
ansible-connection Python3 fix (#26441)
* Fix a number of unicode <-> bytes mismatches
* Return socket_path as text, not bytes
* Docstring run()
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ansible-connection | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ansible-connection b/bin/ansible-connection index 1f46a9e116..8e9114817c 100755 --- a/bin/ansible-connection +++ b/bin/ansible-connection @@ -40,7 +40,7 @@ import datetime import errno from ansible import constants as C -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils._text import to_bytes, to_native, to_text from ansible.module_utils.six import PY3 from ansible.module_utils.six.moves import cPickle from ansible.module_utils.connection import send_data, recv_data @@ -141,7 +141,7 @@ class Server(): signal.signal(signal.SIGALRM, self.command_timeout) signal.alarm(self.play_context.timeout) - op = data.split(':')[0] + op = to_text(data.split(b':')[0]) display.display('socket operation is %s' % op, log_only=True) method = getattr(self, 'do_%s' % op, None) |