def _load_plugins(self):
        """
        Reads, parses and creates plugins specified in config.yaml.
        """
        plugins = ait.config.get('server.plugins')

        if plugins is None:
            log.warn('No plugins specified in config.')
        else:
            for index, p in enumerate(plugins):
                try:
                    plugin = self._create_plugin(p['plugin'])
                    self.plugins.append(plugin)
                    log.info('Added plugin {}'.format(plugin))

                except Exception:
                    exc_type, value, tb = sys.exc_info()
                    log.error('{} creating plugin {}: {}'.format(exc_type,
                                                                 index,
                                                                 value))
            if not self.plugins:
                log.warn('No valid plugin configurations found. No plugins will be added.')
def _load_plugins ( self ) : plugins = ait . config . get ( 'server.plugins' ) if plugins is None : log . warn ( 'No plugins specified in config.' ) else : for index , p in enumerate ( plugins ) : try : plugin = self . _create_plugin ( p [ 'plugin' ] ) self . plugins . append ( plugin ) log . info ( 'Added plugin {}' . format ( plugin ) ) except Exception : exc_type , value , tb = sys . exc_info ( ) log . error ( '{} creating plugin {}: {}' . format ( exc_type , index , value ) ) if not self . plugins : log . warn ( 'No valid plugin configurations found. No plugins will be added.' )
Reads, parses and creates plugins specified in config.yaml.