Skip to content
Permalink
Browse files
Add a debug message on multiple plugin copies
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 4, 2016
1 parent cb3ad31 commit fc52c4206e81573e5fdf7c3df1ad17ee21beaa61
Showing with 4 additions and 1 deletion.
  1. +4 −1 nikola/nikola.py
@@ -933,7 +933,8 @@ def init_plugins(self, commands_only=False, load_all=False):

# Find repeated plugins and discard the less local copy
def plugin_position_in_places(plugin):
# plugin here is a tuple, the 1st element is the path to the .plugin file
# plugin here is a tuple:
# (path to the .plugin file, path to plugin module w/o .py, plugin metadata)
for i, place in enumerate(self._plugin_places):
if plugin[0].startswith(place):
return i
@@ -946,6 +947,8 @@ def plugin_position_in_places(plugin):
if len(plugins) > 1:
# Sort by locality
plugins.sort(key=plugin_position_in_places)
utils.LOGGER.debug("Plugin {} exists in multiple places, using {}".format(
plugins[-1][2].name, plugins[-1][0]))
self.plugin_manager._candidates.append(plugins[-1])

self.plugin_manager.loadPlugins()

0 comments on commit fc52c42

Please sign in to comment.