diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2015-04-15 12:56:05 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2015-04-15 15:26:12 +0200 |
commit | 608efa02ec53a6249c34360e19e1fa0e91726670 (patch) | |
tree | 4085b6ce6d8f3cc7cbe5936044f729229f9edb2a /plugin_registry.py | |
parent | b39dfc479ef74a1fa12340f87843a581157808cc (diff) | |
download | clufter-608efa02ec53a6249c34360e19e1fa0e91726670.tar.gz clufter-608efa02ec53a6249c34360e19e1fa0e91726670.tar.xz clufter-608efa02ec53a6249c34360e19e1fa0e91726670.zip |
Better support of Composite format usage/passing
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'plugin_registry.py')
-rw-r--r-- | plugin_registry.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin_registry.py b/plugin_registry.py index 4f504b0..860855c 100644 --- a/plugin_registry.py +++ b/plugin_registry.py @@ -1,5 +1,5 @@ # -*- coding: UTF-8 -*- -# Copyright 2014 Red Hat, Inc. +# Copyright 2015 Red Hat, Inc. # Part of clufter project # Licensed under GPLv2+ (a copy included | http://gnu.org/licenses/gpl-2.0.txt) """Easy (at least for usage) plugin framework""" @@ -219,7 +219,7 @@ class PluginRegistry(type): Returns `{plugin_name: plugin_cls}` mapping of plugins found. """ ret = {} - fname_start_use = args2sgpl(fname_start or '[!_.]') + fname_start_use = apply_intercalate(args2sgpl(fname_start or '[!_.]')) fp = re_compile('|'.join( translate(fs + '*') for fs in (pfx.split('-', 1)[0] for pfx in fname_start_use) @@ -286,6 +286,7 @@ class PluginManager(object): ret.update(filterdict_remove(to_discover, fn=lambda x: native_plugins[x], *native_plugins.keys())) + to_discover = apply_intercalate(tuple(to_discover)) if to_discover: log.debug("Couldn't look up everything: {0}".format(', '.join( to_discover))) |