diff options
author | Michael DeHaan <michael.dehaan@gmail.com> | 2013-01-26 12:34:30 -0500 |
---|---|---|
committer | Michael DeHaan <michael.dehaan@gmail.com> | 2013-01-26 12:34:30 -0500 |
commit | 36066d8664077b77830ce8fcbc2a790950892b92 (patch) | |
tree | ec0ff73d7491dd0ae5bfadcee2b3394f77d08350 /bin/ansible-doc | |
parent | 5e4d29565cb4b8ac65ffd542713f1af65b951e99 (diff) | |
download | ansible-36066d8664077b77830ce8fcbc2a790950892b92.tar.gz |
Fixup ec2_facts docs parsing
Diffstat (limited to 'bin/ansible-doc')
-rwxr-xr-x | bin/ansible-doc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/ansible-doc b/bin/ansible-doc index 7648e44178..9e8878376c 100755 --- a/bin/ansible-doc +++ b/bin/ansible-doc @@ -33,6 +33,7 @@ from ansible import errors from ansible.utils import module_docs import ansible.constants as C from ansible.utils import version +import traceback MODULEDIR = C.DEFAULT_MODULE_PATH @@ -162,7 +163,8 @@ def main(): desc = desc + '...' print "%-20s %-60.60s" % (module, desc) except: - sys.stderr.write("ERROR: module %s missing documentation\n" % module) + traceback.print_exc() + sys.stderr.write("ERROR: module %s has a documentation error formatting or is missing documentation\n" % module) pass sys.exit() @@ -184,10 +186,11 @@ def main(): try: doc = module_docs.get_docstring(filename) except: - sys.stderr.write("ERROR: module %s missing documentation\n" % module) + traceback.print_exc() + sys.stderr.write("ERROR: module %s has a documentation error formatting or is missing documentation\n" % module) continue - if not doc is None: + if doc is not None: all_keys = [] for (k,v) in doc['options'].iteritems(): |