From 2dde7f776893f5611db907ec3245eeedc129ccee Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 21 Feb 2017 10:28:54 -0800 Subject: [PATCH] Fix a case where we mixed text and bytes in the local connection plugin Fixes #20710 --- lib/ansible/plugins/connection/local.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/connection/local.py b/lib/ansible/plugins/connection/local.py index 133401581d7..fa49a81c9ef 100644 --- a/lib/ansible/plugins/connection/local.py +++ b/lib/ansible/plugins/connection/local.py @@ -28,7 +28,7 @@ import ansible.constants as C from ansible.compat import selectors from ansible.compat.six import text_type, binary_type from ansible.errors import AnsibleError, AnsibleFileNotFound -from ansible.module_utils._text import to_bytes, to_native +from ansible.module_utils._text import to_bytes, to_native, to_text from ansible.plugins.connection import ConnectionBase @@ -67,7 +67,7 @@ class Connection(ConnectionBase): executable = C.DEFAULT_EXECUTABLE.split()[0] if C.DEFAULT_EXECUTABLE else None - display.vvv(u"EXEC {0}".format(cmd), host=self._play_context.remote_addr) + display.vvv(u"EXEC {0}".format(to_text(cmd)), host=self._play_context.remote_addr) display.debug("opening command with Popen()") if isinstance(cmd, (text_type, binary_type)):