equal
deleted
inserted
replaced
79 Returns: Boolean: Have the functions succeeded in opening the files? |
79 Returns: Boolean: Have the functions succeeded in opening the files? |
80 """ |
80 """ |
81 # Find all the filter plugins |
81 # Find all the filter plugins |
82 self.pbox = pbox |
82 self.pbox = pbox |
83 possiblefilters = self.pbox.classesof(filter_interface.Filter) |
83 possiblefilters = self.pbox.classesof(filter_interface.Filter) |
|
84 |
84 filterdict = {} |
85 filterdict = {} |
85 for p in possiblefilters: |
86 for p in possiblefilters: |
86 name = p.__name__.lower() |
87 name = p.__name__.lower() |
87 if name in filterdict: |
88 if name in filterdict: |
88 raise ValueError("filters found in SBS_HOME/python/plugins which have duplicate name: %s " % p.__name__) |
89 raise ValueError("filters found in SBS_HOME/python/plugins which have duplicate name: %s " % p.__name__) |
92 unfound = [] |
93 unfound = [] |
93 self.filters = [] |
94 self.filters = [] |
94 for f in filternames: |
95 for f in filternames: |
95 found = False |
96 found = False |
96 if f.lower() in filterdict: |
97 if f.lower() in filterdict: |
97 self.filters.append(filterdict[f.lower()]) |
98 self.filters.append(filterdict[f.lower()]()) |
98 else: |
99 else: |
99 unfound.append(f) |
100 unfound.append(f) |
100 |
101 |
101 if unfound != []: |
102 if unfound != []: |
102 raise ValueError("requested filters not found: %s \ |
103 raise ValueError("requested filters not found: %s \ |