Clarify error message when module replacer encounters a bad import line for module_utils code
This commit is contained in:
parent
d9dcb2a427
commit
486304ba1c
1 changed files with 1 additions and 1 deletions
|
@ -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.<lib name> 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")))
|
||||
|
|
Loading…
Reference in a new issue