diff options
author | James Cammarata <jimi@sngx.net> | 2015-05-28 22:26:03 +0200 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2015-05-28 22:26:03 +0200 |
commit | 2bad888f28bc1286458c1f267487c3d196ae339a (patch) | |
tree | 60b0d31deedd31d2537fc1fbc01f8df1559926dd /hacking | |
parent | Update submodule ref (diff) | |
parent | More module_utils/basic.py unit tests for v2 (diff) | |
download | ansible-2bad888f28bc1286458c1f267487c3d196ae339a.tar.xz ansible-2bad888f28bc1286458c1f267487c3d196ae339a.zip |
Merge branch 'v2_final' into devel_switch_v2
Conflicts:
lib/ansible/inventory/__init__.py
lib/ansible/modules/core
lib/ansible/utils/__init__.py
lib/ansible/utils/module_docs.py
Diffstat (limited to 'hacking')
-rwxr-xr-x | hacking/module_formatter.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/hacking/module_formatter.py b/hacking/module_formatter.py index 32df84deb9..acddd70093 100755 --- a/hacking/module_formatter.py +++ b/hacking/module_formatter.py @@ -33,8 +33,8 @@ import subprocess import cgi from jinja2 import Environment, FileSystemLoader -import ansible.utils -import ansible.utils.module_docs as module_docs +from ansible.utils import module_docs +from ansible.utils.vars import merge_hash ##################################################################################### # constants and paths @@ -135,7 +135,7 @@ def list_modules(module_dir, depth=0): res = list_modules(d, depth + 1) for key in res.keys(): if key in categories: - categories[key] = ansible.utils.merge_hash(categories[key], res[key]) + categories[key] = merge_hash(categories[key], res[key]) res.pop(key, None) if depth < 2: @@ -236,11 +236,11 @@ def process_module(module, options, env, template, outputname, module_map, alias print "rendering: %s" % module # use ansible core library to parse out doc metadata YAML and plaintext examples - doc, examples, returndocs= ansible.utils.module_docs.get_docstring(fname, verbose=options.verbose) + doc, examples, returndocs = module_docs.get_docstring(fname, verbose=options.verbose) # crash if module is missing documentation and not explicitly hidden from docs index if doc is None: - if module in ansible.utils.module_docs.BLACKLIST_MODULES: + if module in module_docs.BLACKLIST_MODULES: return "SKIPPED" else: sys.stderr.write("*** ERROR: MODULE MISSING DOCUMENTATION: %s, %s ***\n" % (fname, module)) @@ -278,8 +278,9 @@ def process_module(module, options, env, template, outputname, module_map, alias if added and added_float < TO_OLD_TO_BE_NOTABLE: del doc['version_added'] - for (k,v) in doc['options'].iteritems(): - all_keys.append(k) + if 'options' in doc: + for (k,v) in doc['options'].iteritems(): + all_keys.append(k) all_keys = sorted(all_keys) |