From 486304ba1cc00eee837a0b4af69891d1070882ac Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 10 Feb 2016 08:45:29 -0800 Subject: [PATCH] Clarify error message when module replacer encounters a bad import line for module_utils code --- 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 ba32273256f..f0e307cba0b 100644 --- a/lib/ansible/executor/module_common.py +++ b/lib/ansible/executor/module_common.py @@ -97,7 +97,7 @@ def _find_snippet_imports(module_data, module_path, strip_comments): if " import *" not in line: import_error = True if import_error: - raise AnsibleError("error importing module in %s, expecting format like 'from ansible.module_utils.basic import *'" % module_path) + raise AnsibleError("error importing module in %s, expecting format like 'from ansible.module_utils. import *'" % module_path) snippet_name = tokens[2].split()[0] snippet_names.append(snippet_name) output.write(_slurp(os.path.join(_SNIPPET_PATH, snippet_name + ".py")))