diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-02-10 08:39:02 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-02-10 08:51:24 +0100 |
commit | 0a69a106bcf84f261837143e6ca9aa973c56ded1 (patch) | |
tree | a9c5b50d3c6b324b60d12cb73221873c2684efb3 /filter_manager.py | |
parent | ff7d17137f6566e1b904f115664b24ffdf2be472 (diff) | |
download | clufter-0a69a106bcf84f261837143e6ca9aa973c56ded1.tar.gz clufter-0a69a106bcf84f261837143e6ca9aa973c56ded1.tar.xz clufter-0a69a106bcf84f261837143e6ca9aa973c56ded1.zip |
utils: tuple-or-list = tuplist + function to detect it
Also apply/substitute the verbatim detection where suitable.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'filter_manager.py')
-rw-r--r-- | filter_manager.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/filter_manager.py b/filter_manager.py index 8263e7e..e3dd8a0 100644 --- a/filter_manager.py +++ b/filter_manager.py @@ -13,7 +13,8 @@ from .format import CompositeFormat, Format from .plugin_registry import PluginManager from .utils import apply_preserving_depth, \ apply_aggregation_preserving_depth, \ - apply_intercalate + apply_intercalate, \ + tuplist log = logging.getLogger(__name__) @@ -51,7 +52,7 @@ class FilterManager(PluginManager): (lambda formats: lambda protocol, *args: CompositeFormat(protocol, formats=formats, *args) - )(res_output[i]) if isinstance(o, (tuple, list)) else o + )(res_output[i]) if tuplist(o) else o for i, o in enumerate(res_output) ) filters[flt_name] = flt_cls(*res_output) |