revert action loader changes to doc, due to error

restoring behaviour in which a missing module is a warning that shows paths searched,
patch incorrectly bypassed detection and ended up in an exception: global name 'module' is not defined
This commit is contained in:
Brian Coca 2017-07-25 16:33:30 -04:00
parent 4811c7f117
commit 4fba9bf23b

View file

@ -124,8 +124,6 @@ class DocCLI(CLI):
try: try:
# if the plugin lives in a non-python file (eg, win_X.ps1), require the corresponding python file for docs # if the plugin lives in a non-python file (eg, win_X.ps1), require the corresponding python file for docs
filename = loader.find_plugin(plugin, mod_type='.py', ignore_deprecated=True) filename = loader.find_plugin(plugin, mod_type='.py', ignore_deprecated=True)
if filename is None and loader == module_loader:
filename = action_loader.find_plugin(module, mod_type='.py')
if filename is None: if filename is None:
display.warning("%s %s not found in %s\n" % (plugin_type, plugin, DocCLI.print_paths(loader))) display.warning("%s %s not found in %s\n" % (plugin_type, plugin, DocCLI.print_paths(loader)))
continue continue
@ -219,8 +217,6 @@ class DocCLI(CLI):
# if the module lives in a non-python file (eg, win_X.ps1), require the corresponding python file for docs # if the module lives in a non-python file (eg, win_X.ps1), require the corresponding python file for docs
filename = loader.find_plugin(plugin, mod_type='.py', ignore_deprecated=True) filename = loader.find_plugin(plugin, mod_type='.py', ignore_deprecated=True)
if filename is None and loader == module_loader:
filename = action_loader.find_plugin(module, mod_type='.py')
if filename is None: if filename is None:
continue continue
if filename.endswith(".ps1"): if filename.endswith(".ps1"):