From ca22783086d40cdd0f2fe8fcde1361f8a5212cef Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Thu, 12 May 2016 12:53:30 -0500 Subject: [PATCH] modify_module does not need to return module_path, as the calling code already has access to it --- lib/ansible/executor/module_common.py | 4 ++-- lib/ansible/plugins/action/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/executor/module_common.py b/lib/ansible/executor/module_common.py index d87860ac62..2f98e048be 100644 --- a/lib/ansible/executor/module_common.py +++ b/lib/ansible/executor/module_common.py @@ -739,7 +739,7 @@ def modify_module(module_name, module_path, module_args, task_vars=dict(), modul (module_data, module_style, shebang) = _find_snippet_imports(module_name, module_data, module_path, module_args, task_vars, module_compression) if module_style == 'binary': - return (module_path, module_data, module_style, shebang) + return (module_data, module_style, shebang) elif shebang is None: lines = module_data.split(b"\n", 1) if lines[0].startswith(b"#!"): @@ -762,4 +762,4 @@ def modify_module(module_name, module_path, module_args, task_vars=dict(), modul else: shebang = to_bytes(shebang, errors='strict') - return (module_path, module_data, module_style, shebang) + return (module_data, module_style, shebang) diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py index 6182368a40..9414a149fc 100644 --- a/lib/ansible/plugins/action/__init__.py +++ b/lib/ansible/plugins/action/__init__.py @@ -145,7 +145,7 @@ class ActionBase(with_metaclass(ABCMeta, object)): "run 'git submodule update --init --recursive' to correct this problem." % (module_name)) # insert shared code and arguments into the module - (module_path, module_data, module_style, module_shebang) = modify_module(module_name, module_path, module_args, task_vars=task_vars, module_compression=self._play_context.module_compression) + (module_data, module_style, module_shebang) = modify_module(module_name, module_path, module_args, task_vars=task_vars, module_compression=self._play_context.module_compression) return (module_style, module_shebang, module_data, module_path)