Navigation Menu

Skip to content

Commit

Permalink
Make sure DISABLED_PLUGINS takes precedence over listed compilers.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Apr 1, 2017
1 parent 6fcffe3 commit e3eb204
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions nikola/nikola.py
Expand Up @@ -1062,19 +1062,14 @@ def init_plugins(self, commands_only=False, load_all=False):
else:
bad_candidates.add(p)
elif self.configured: # Not commands-only, and configured
# Remove compilers we don't use
if p[-1].name in self.bad_compilers:
bad_candidates.add(p)
self.disabled_compilers[p[-1].name] = p
if p[-1].name not in compilers and \
p[-1].details.has_option('Nikola', 'PluginCategory') and p[-1].details.get('Nikola', 'PluginCategory') in ('Compiler', 'PageCompiler'):
bad_candidates.add(p)
self.disabled_compilers[p[-1].name] = p
utils.LOGGER.debug('Not loading unneeded compiler {}', p[-1].name)
# Remove blacklisted plugins
if p[-1].name in self.config['DISABLED_PLUGINS']:
bad_candidates.add(p)
utils.LOGGER.debug('Not loading disabled plugin {}', p[-1].name)
# Remove compilers we don't use
if p[-1].details.has_option('Nikola', 'PluginCategory') and p[-1].details.get('Nikola', 'PluginCategory') in ('Compiler', 'PageCompiler'):
bad_candidates.add(p)
self.disabled_compilers[p[-1].name] = p
# Remove compiler extensions we don't need
if p[-1].details.has_option('Nikola', 'compiler') and p[-1].details.get('Nikola', 'compiler') in self.disabled_compilers:
bad_candidates.add(p)
Expand Down

0 comments on commit e3eb204

Please sign in to comment.