(cls, plugin_class)
Registers a plugin class.

        The plugin classes are identified based on their lower case name.

        Args:
            plugin_class (type): the class object of the plugin.

        Raises:
            KeyError: if plugin class is already set for the corresponding
            name.
Registers a plugin class.
Registers a plugin class .
def register_plugin(cls, plugin_class):
        """Registers a plugin class.

        The plugin classes are identified based on their lower case name.

        Args:
            plugin_class (type): the class object of the plugin.

        Raises:
            KeyError: if plugin class is already set for the corresponding
            name.
        """
        plugin_name = plugin_class.NAME.lower()
        if plugin_name in cls._plugin_classes:
            raise KeyError(('Plugin class already set for : {0:s}.').format(
                plugin_class.NAME))

        cls._plugin_classes[plugin_name] = plugin_class
def register_plugin ( cls , plugin_class ) : plugin_name = plugin_class . NAME . lower ( ) if plugin_name in cls . _plugin_classes : raise KeyError ( ( 'Plugin class already set for : {0:s}.' ) . format ( plugin_class . NAME ) ) cls . _plugin_classes [ plugin_name ] = plugin_class