nikola
nikola copied to clipboard
Plugin name not being correctly accessed
The name specified for a plugin seems not to be correctly accessed - it's not being read from the plugin_info's plugin_object, as it ought to be. Instead of
https://github.com/getnikola/nikola/blob/650b954294ab01627ba9b45d81835293a5e02bb8/nikola/nikola.py#L1152
it should be something like
name = getattr(plugin_info.plugin_object, 'name', plugin_info.name)
self._commands[name] = plugin_info.plugin_object
Similar logic needs to be applied for the activation, at
https://github.com/getnikola/nikola/blob/650b954294ab01627ba9b45d81835293a5e02bb8/nikola/nikola.py#L1321
which could be something like
name = getattr(plugin_info.plugin_object, 'name', plugin_info.name)
self.plugin_manager.activatePluginByName(name)