diff options
author | Brian Coca <bcoca@users.noreply.github.com> | 2022-09-01 17:48:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-01 17:48:04 -0400 |
commit | 72783837c567ba221bd4dca3ece4a917b0f6527e (patch) | |
tree | bdc04879980a0c04fcb41c0e3c97fcc6fbebc6dd /lib/ansible/utils | |
parent | 077e1bfe17b99d805dfa94ad9f67e2384077808c (diff) | |
download | ansible-72783837c567ba221bd4dca3ece4a917b0f6527e.tar.gz |
fix issue with legacy pugins and no docs (#78686)
* fix issue with legacy pugins and no docs
Diffstat (limited to 'lib/ansible/utils')
-rw-r--r-- | lib/ansible/utils/plugin_docs.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/utils/plugin_docs.py b/lib/ansible/utils/plugin_docs.py index 6c5840ae45..b95a4c0bfd 100644 --- a/lib/ansible/utils/plugin_docs.py +++ b/lib/ansible/utils/plugin_docs.py @@ -340,7 +340,8 @@ def get_plugin_docs(plugin, plugin_type, loader, fragment_loader, verbose): if not docs[0]: try: newfile = _find_adjacent(filename, plugin, C.DOC_EXTENSIONS) - docs = get_docstring(newfile, fragment_loader, verbose=verbose, collection_name=collection_name, plugin_type=plugin_type) + if newfile: + docs = get_docstring(newfile, fragment_loader, verbose=verbose, collection_name=collection_name, plugin_type=plugin_type) except Exception as e: raise AnsibleParserError('Adjacent file %s did not contain a DOCUMENTATION attribute (%s)' % (plugin, filename), orig_exc=e) |