From 638ac9c2814e51f91182e251103450897afbf595 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 22 Aug 2010 15:47:36 +0000 Subject: [PATCH] FilterList needs to handle all namespaces svn: r15802 --- src/Filters/_FilterList.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Filters/_FilterList.py b/src/Filters/_FilterList.py index bf7bfa8ed..b936aea28 100644 --- a/src/Filters/_FilterList.py +++ b/src/Filters/_FilterList.py @@ -51,16 +51,17 @@ class FilterList(object): def __init__(self, file): self.filter_namespaces = {} self.file = os.path.expanduser(file) - self._cached = None + self._cached = {} def get_filters_dict(self, namespace='generic'): """ This runs every for every item to be matched! """ - if self._cached is None: + if self._cached.get(namespace, None) is None: filters = self.get_filters(namespace) - self._cached = dict([(filt.name, filt) for filt in filters]) - return self._cached + self._cached[namespace] = dict([(filt.name, filt) for filt + in filters]) + return self._cached[namespace] def get_filters(self, namespace='generic'): """