#NEWLINE# def load_plugins( self ) : #NEWLINE# #INDENT# '\n        Create Plugin objects\n        ' #NEWLINE# try : #NEWLINE# #INDENT# self . get_template ( 'BasePlugin' ) #NEWLINE# #UNINDENT# except ( TemplateNotFound , NoTemplatesConfigured ) : #NEWLINE# #INDENT# lg . error ( 'Required BasePlugin template is not configured!' ) #NEWLINE# raise BasePluginTemplateNotFound #NEWLINE# #UNINDENT# for ( plugin , options ) in self . conf_plugins . iteritems ( ) : #NEWLINE# #INDENT# if ( options . has_key ( 'Enabled' ) and ( options [ 'Enabled' ] == False ) ) : #NEWLINE# #INDENT# lg . info ( ( 'Plugin %s is disabled, skipping..' % plugin ) ) #NEWLINE# continue #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . plugins [ plugin ] = self . load_plugin ( plugin , options ) #NEWLINE# #UNINDENT# except TemplateNotFound : #NEWLINE# #INDENT# lg . error ( ( "Can't find configured template %s for plugin %s, plugin not loaded" % ( options [ 'Template' ] , plugin ) ) ) #NEWLINE# continue #NEWLINE# #UNINDENT# except NoTemplatesConfigured : #NEWLINE# #INDENT# lg . error ( ( 'There are no templates configured, template %s is required by plugin %s, plugin not loaded' % ( options [ 'Template' ] , plugin ) ) ) #NEWLINE# continue #NEWLINE# #UNINDENT# except AssertionError as e : #NEWLINE# #INDENT# lg . error ( ( 'Plugin %s not loaded: AssertionError, %s' % ( plugin , e ) ) ) #NEWLINE# continue #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# lg . error ( ( 'Plugin %s not loaded: %s' % ( plugin , e ) ) ) #NEWLINE# lg . exception ( e ) #NEWLINE# continue #NEWLINE# #UNINDENT# lg . info ( ( 'Loaded plugin %s' % plugin ) ) #NEWLINE# #UNINDENT# if ( len ( options . plugins ) == 0 ) : #NEWLINE# #INDENT# lg . error ( 'No plugins loaded!' ) #NEWLINE# raise NoRunningPlugins ( 'No plugins loaded!' )