From a581b61cfd1666f38b4b726da33c786dccef1ed8 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 16 Nov 2010 11:46:35 +0000 Subject: [PATCH] Allow general plugin type to return list svn: r16195 --- src/Filters/_FilterList.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Filters/_FilterList.py b/src/Filters/_FilterList.py index 1cd8e67bc..224d85394 100644 --- a/src/Filters/_FilterList.py +++ b/src/Filters/_FilterList.py @@ -76,11 +76,15 @@ class FilterList(object): if plugins: plugin_filters = [] try: - plugin_filters = [plug for plug in [plug(namespace) - if callable(plug) - else plug - for plug in plugins] - if plug is not None] + for plug in plugins: + if callable(plug): + plug = plug(namespace) + if plug: + if isinstance(plug, (list, tuple)): + for subplug in plug: + plugin_filters.append(subplug) + else: + plugin_filters.append(plug) except: import traceback traceback.print_exc()