#NEWLINE# def get_plugins_by_name( self , * names ) : #NEWLINE# #INDENT# '\n        Return a list of plugins by plugin class, or name.\n        ' #NEWLINE# self . _import_plugins ( ) #NEWLINE# plugin_instances = [ ] #NEWLINE# for name in names : #NEWLINE# #INDENT# if isinstance ( name , six . string_types ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# plugin_instances . append ( self . plugins [ name . lower ( ) ] ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise PluginNotFound ( "No plugin named '{0}'." . format ( name ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if issubclass ( name , ContentPlugin ) : #NEWLINE# #INDENT# plugin_instances . append ( self . plugins [ self . _name_for_model [ name . model ] ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise TypeError ( 'get_plugins_by_name() expects a plugin name or class, not: {0}' . format ( name ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return plugin_instances