diff options
author | Marc Bonnici <marc.bonnici@arm.com> | 2018-04-27 16:13:38 +0100 |
---|---|---|
committer | setrofim <setrofim@gmail.com> | 2018-04-27 16:29:53 +0100 |
commit | 1b557e5c5a27946b08978ef4bd2864333b574e36 (patch) | |
tree | f79b5f7ab6bab78c1d7f41649c6aafa11ec05a42 /wa/commands | |
parent | 99f8efbaf58c60846586de84f5a4acf1afdffdf2 (diff) |
commands/show: Add missing identifiers
Ensure that plugin names are converted to identifiers when searching for
plugins.
Diffstat (limited to 'wa/commands')
-rw-r--r-- | wa/commands/show.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wa/commands/show.py b/wa/commands/show.py index f42f631a..ca7e534f 100644 --- a/wa/commands/show.py +++ b/wa/commands/show.py @@ -19,7 +19,7 @@ from wa.framework import pluginloader from wa.framework.configuration.core import MetaConfiguration, RunConfiguration from wa.framework.exception import NotFoundError from wa.framework.target.descriptor import list_target_descriptions -from wa.utils.types import caseless_string +from wa.utils.types import caseless_string, identifier from wa.utils.doc import (strip_inlined_text, get_rst_from_plugin, get_params_rst, underline) from wa.utils.misc import which @@ -36,7 +36,7 @@ class ShowCommand(Command): help='The name of the plugin to display documentation for.') def execute(self, state, args): - name = args.plugin + name = identifier(args.plugin) rst_output = None if name == caseless_string('settings'): @@ -79,7 +79,7 @@ class ShowCommand(Command): def get_plugin(name): for plugin in pluginloader.list_plugins(): - if name == plugin.name: + if name == identifier(plugin.name): return plugin if hasattr(plugin, 'alias'): for alias in plugin.alias: @@ -90,7 +90,7 @@ def get_plugin(name): def get_target_description(name): targets = list_target_descriptions() for target in targets: - if name == target.name: + if name == identifier(target.name): return target |