From a451613dd18e76d585ed34f3417a712b4d792572 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Thu, 18 Jan 2018 15:30:40 -0600 Subject: [PATCH] Make sure we don't try to inspect DOCUMENTATION, if the plugin doesn't have any (#35017) --- lib/ansible/plugins/loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/loader.py b/lib/ansible/plugins/loader.py index 16f66ed040..d3602ebdfb 100644 --- a/lib/ansible/plugins/loader.py +++ b/lib/ansible/plugins/loader.py @@ -214,7 +214,7 @@ class PluginLoader: if type_name in ('callback', 'connection', 'inventory', 'lookup', 'shell'): 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']) display.debug('Loaded config def from plugin (%s/%s)' % (type_name, name))