diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-03-06 19:47:49 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-03-06 19:52:02 +0100 |
commit | 7269bb0e809d9b517b7e47b9da109ea827f7dae0 (patch) | |
tree | 890091ef59315b8aea057bf20250d2775f053102 /plugin_registry.py | |
parent | a6ee860c67224208451994e978b88483fcc2c0f8 (diff) | |
download | clufter-7269bb0e809d9b517b7e47b9da109ea827f7dae0.tar.gz clufter-7269bb0e809d9b517b7e47b9da109ea827f7dae0.tar.xz clufter-7269bb0e809d9b517b7e47b9da109ea827f7dae0.zip |
Formalize s/_/-/g + inverse transformation as functions
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'plugin_registry.py')
-rw-r--r-- | plugin_registry.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin_registry.py b/plugin_registry.py index 5c09a40..463c41d 100644 --- a/plugin_registry.py +++ b/plugin_registry.py @@ -12,7 +12,7 @@ from os.path import abspath, dirname, join, splitext from contextlib import contextmanager from sys import modules -from .utils import classproperty, hybridproperty +from .utils import classproperty, cli_decor, hybridproperty log = logging.getLogger(__name__) @@ -72,7 +72,7 @@ class PluginRegistry(type): def probe(registry, name, bases, attrs): """Meta-magic to register plugin""" assert '-' not in name, "name cannot contain a dash" - name = name.replace('_', '-') + name = cli_decor(name) try: ret = registry._plugins[name] log.info("Probe `{0}' plugin under `{1}' registry: already tracked" |