Removed for now; too slow

svn: r15799
This commit is contained in:
Doug Blank 2010-08-22 14:28:35 +00:00
parent acf10439e0
commit ac7210d0ba

View File

@ -34,7 +34,9 @@ import os
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from Filters._FilterParser import FilterParser from Filters._FilterParser import FilterParser
from gen.plug import BasePluginManager
PLUGMAN = BasePluginManager.get_instance()
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# FilterList # FilterList
@ -51,23 +53,26 @@ class FilterList(object):
self.file = os.path.expanduser(file) self.file = os.path.expanduser(file)
def get_filters(self, namespace='generic'): def get_filters(self, namespace='generic'):
from gen.plug import BasePluginManager """
This runs every for every item to be matched!
"""
if namespace in self.filter_namespaces: if namespace in self.filter_namespaces:
filters = self.filter_namespaces[namespace] filters = self.filter_namespaces[namespace]
else: else:
filters = [] filters = []
PLUGMAN = BasePluginManager.get_instance() # plugins = PLUGMAN.process_plugin_data('Filters')
plugins = PLUGMAN.process_plugin_data('Filter: %s' % namespace) # plugin_filters = []
try: # if plugins:
plugin_filters = [plug for plug in [plug() if callable(plug) # try:
else plug # plugin_filters = [plug for plug in [plug(namespace)
for plug in plugins] # if callable(plug)
if plug is not None] # else plug
except: # for plug in plugins]
plugin_filters = [] # if plug is not None]
import traceback # except:
traceback.print_exc() # import traceback
return filters + plugin_filters # traceback.print_exc()
return filters
def add(self, namespace, filt): def add(self, namespace, filt):
assert(isinstance(namespace, basestring)) assert(isinstance(namespace, basestring))