1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Make sure we don't try to inspect DOCUMENTATION, if the plugin doesn't have any (#35017)

This commit is contained in:
Matt Martz 2018-01-18 15:30:40 -06:00 committed by GitHub
parent 3a4b69096f
commit a451613dd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -214,7 +214,7 @@ class PluginLoader:
if type_name in ('callback', 'connection', 'inventory', 'lookup', 'shell'): if type_name in ('callback', 'connection', 'inventory', 'lookup', 'shell'):
dstring = get_docstring(path, fragment_loader, verbose=False, ignore_errors=True)[0] dstring = get_docstring(path, fragment_loader, verbose=False, ignore_errors=True)[0]
if 'options' in dstring and isinstance(dstring['options'], dict): if dstring and 'options' in dstring and isinstance(dstring['options'], dict):
C.config.initialize_plugin_configuration_definitions(type_name, name, dstring['options']) C.config.initialize_plugin_configuration_definitions(type_name, name, dstring['options'])
display.debug('Loaded config def from plugin (%s/%s)' % (type_name, name)) display.debug('Loaded config def from plugin (%s/%s)' % (type_name, name))