Merge pull request #1426 from mxr/fix-return

Remove usage of self.manager.map() in load_plugins()
This commit is contained in:
Anthony Sottile 2021-10-17 19:16:18 -07:00 committed by GitHub
commit bcb88c4c3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 56 deletions

View file

@ -415,14 +415,11 @@ class PluginTypeManager:
if self.plugins_loaded:
return
def load_plugin(plugin):
"""Call each plugin's load_plugin method."""
return plugin.load_plugin()
for plugin in self.plugins.values():
plugin.load_plugin()
plugins = list(self.manager.map(load_plugin))
# Do not set plugins_loaded if we run into an exception
self.plugins_loaded = True
return plugins
def register_plugin_versions(self, optmanager):
"""Register the plugins and their versions with the OptionManager."""