From e01b6ad6b472c191e316c4a8405801f56e9427fb Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 26 Feb 2016 16:57:32 -0800 Subject: [PATCH] We are actually taking the repr of a string so we need separate to_bytes and repr calls --- lib/ansible/executor/module_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/executor/module_common.py b/lib/ansible/executor/module_common.py index e6fa2148b8..9d50be0ca3 100644 --- a/lib/ansible/executor/module_common.py +++ b/lib/ansible/executor/module_common.py @@ -169,7 +169,7 @@ def modify_module(module_path, module_args, task_vars=dict(), strip_comments=Fal python_repred_args = to_bytes(repr(module_args_json)) # these strings should be part of the 'basic' snippet which is required to be included - module_data = module_data.replace(REPLACER_VERSION, to_bytes(__version__, nonstring='repr')) + module_data = module_data.replace(REPLACER_VERSION, to_bytes(repr(__version__))) module_data = module_data.replace(REPLACER_COMPLEX, python_repred_args) module_data = module_data.replace(REPLACER_WINARGS, module_args_json) module_data = module_data.replace(REPLACER_JSONARGS, module_args_json)