diff options
author | Brian Coca <bcoca@users.noreply.github.com> | 2022-09-06 16:13:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-06 16:13:18 -0400 |
commit | dc2a79f1c3e45ac9b3c44f8d03b966903ca66de0 (patch) | |
tree | 0bdc1e56ce83ce98d52b003c8463341961c4c14e /lib/ansible/utils | |
parent | 38a82a5cc43ed4b48cf5fbc3addc5d2993c37eef (diff) | |
download | ansible-dc2a79f1c3e45ac9b3c44f8d03b966903ca66de0.tar.gz |
ansilbe-doc fixes for filters/test listing (#78696)
* split filters
* listing fixes
* return to no docs being exception
Diffstat (limited to 'lib/ansible/utils')
-rw-r--r-- | lib/ansible/utils/plugin_docs.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ansible/utils/plugin_docs.py b/lib/ansible/utils/plugin_docs.py index b95a4c0bfd..a4c1022992 100644 --- a/lib/ansible/utils/plugin_docs.py +++ b/lib/ansible/utils/plugin_docs.py @@ -342,15 +342,15 @@ def get_plugin_docs(plugin, plugin_type, loader, fragment_loader, verbose): newfile = _find_adjacent(filename, plugin, C.DOC_EXTENSIONS) if newfile: docs = get_docstring(newfile, fragment_loader, verbose=verbose, collection_name=collection_name, plugin_type=plugin_type) + filename = newfile except Exception as e: raise AnsibleParserError('Adjacent file %s did not contain a DOCUMENTATION attribute (%s)' % (plugin, filename), orig_exc=e) - # got nothing, so this is 'undocumented', but lets populate at least some friendly info - if not docs[0]: - docs[0] = {'description': 'UNDOCUMENTED', 'short_description': 'UNDOCUMENTED'} - # add extra data to docs[0] (aka 'DOCUMENTATION') - docs[0]['filename'] = filename - docs[0]['collection'] = collection_name + if docs[0] is None: + raise AnsibleParserError('No documentation availalbe for %s (%s)' % (plugin, filename)) + else: + docs[0]['filename'] = filename + docs[0]['collection'] = collection_name return docs |