aboutsummaryrefslogtreecommitdiff
path: root/modules/commands.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-12-29 21:38:03 +0000
committerGravatar jesopo2018-12-29 21:38:03 +0000
commit3d60d59510f55b2ab830d44bc1315982e878f7d1 (patch)
tree16d1cc543da4463e1fe8142319595373c0374d3b /modules/commands.py
parentRemove an erroneous level of indentation that prevented the command being (diff)
signature
We need to normalise between a single usage string and multiple (making both
lists) to reuse the formatting code (commands.py)
Diffstat (limited to 'modules/commands.py')
-rw-r--r--modules/commands.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/commands.py b/modules/commands.py
index 34688d5a..662d2581 100644
--- a/modules/commands.py
+++ b/modules/commands.py
@@ -249,7 +249,9 @@ class Module(ModuleManager.BaseModule):
return hook.get_kwarg("help", None) or hook.docstring.description
def _get_usage(self, hook, command):
usage = hook.get_kwarg("usage", None)
- if not usage:
+ if usage:
+ usages = [usage]
+ else:
usages = hook.docstring.var_items.get("usage", None)
if usages: