Skip to content
Permalink
Browse files
Remove DISABLED_PLUGINS harder
  • Loading branch information
ralsina committed Aug 14, 2015
1 parent 5991505 commit 145d9f348c701348c20ccc10f5e351b4884446a9
Showing with 6 additions and 6 deletions.
  1. +6 −6 nikola/nikola.py
@@ -745,7 +745,10 @@ def __init__(self, **config):

self.plugin_manager.getPluginLocator().setPluginPlaces(places)
self.plugin_manager.locatePlugins()
# Remove compilers we don't use
self.plugin_manager._candidates = [p for p in self.plugin_manager._candidates if p[-1].name not in bad_compilers]
# Remove blacklisted plugins
self.plugin_manager._candidates = [p for p in self.plugin_manager._candidates if p[-1].name not in self.config['DISABLED_PLUGINS']]
self.plugin_manager.loadPlugins()

self._activate_plugins_of_category("SignalHandler")
@@ -870,12 +873,9 @@ def _activate_plugins_of_category(self, category):
# this code duplicated in tests/base.py
plugins = []
for plugin_info in self.plugin_manager.getPluginsOfCategory(category):
if plugin_info.name in self.config.get('DISABLED_PLUGINS'):
self.plugin_manager.removePluginFromCategory(plugin_info, category)
else:
self.plugin_manager.activatePluginByName(plugin_info.name)
plugin_info.plugin_object.set_site(self)
plugins.append(plugin_info)
self.plugin_manager.activatePluginByName(plugin_info.name)
plugin_info.plugin_object.set_site(self)
plugins.append(plugin_info)
return plugins

def _get_themes(self):

0 comments on commit 145d9f3

Please sign in to comment.