|
|
@ -342,14 +342,14 @@ def get_plugin_docs(plugin, plugin_type, loader, fragment_loader, verbose):
|
|
|
|
newfile = _find_adjacent(filename, plugin, C.DOC_EXTENSIONS)
|
|
|
|
newfile = _find_adjacent(filename, plugin, C.DOC_EXTENSIONS)
|
|
|
|
if newfile:
|
|
|
|
if newfile:
|
|
|
|
docs = get_docstring(newfile, fragment_loader, verbose=verbose, collection_name=collection_name, plugin_type=plugin_type)
|
|
|
|
docs = get_docstring(newfile, fragment_loader, verbose=verbose, collection_name=collection_name, plugin_type=plugin_type)
|
|
|
|
|
|
|
|
filename = newfile
|
|
|
|
except Exception as e:
|
|
|
|
except Exception as e:
|
|
|
|
raise AnsibleParserError('Adjacent file %s did not contain a DOCUMENTATION attribute (%s)' % (plugin, filename), orig_exc=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')
|
|
|
|
# add extra data to docs[0] (aka 'DOCUMENTATION')
|
|
|
|
|
|
|
|
if docs[0] is None:
|
|
|
|
|
|
|
|
raise AnsibleParserError('No documentation availalbe for %s (%s)' % (plugin, filename))
|
|
|
|
|
|
|
|
else:
|
|
|
|
docs[0]['filename'] = filename
|
|
|
|
docs[0]['filename'] = filename
|
|
|
|
docs[0]['collection'] = collection_name
|
|
|
|
docs[0]['collection'] = collection_name
|
|
|
|
|
|
|
|
|
|
|
|