We need to normalise between a single usage string and multiple (making both
lists) to reuse the formatting code (commands.py)
This commit is contained in:
parent
ee8d3a6287
commit
3d60d59510
1 changed files with 3 additions and 1 deletions
|
@ -249,7 +249,9 @@ class Module(ModuleManager.BaseModule):
|
||||||
return hook.get_kwarg("help", None) or hook.docstring.description
|
return hook.get_kwarg("help", None) or hook.docstring.description
|
||||||
def _get_usage(self, hook, command):
|
def _get_usage(self, hook, command):
|
||||||
usage = hook.get_kwarg("usage", None)
|
usage = hook.get_kwarg("usage", None)
|
||||||
if not usage:
|
if usage:
|
||||||
|
usages = [usage]
|
||||||
|
else:
|
||||||
usages = hook.docstring.var_items.get("usage", None)
|
usages = hook.docstring.var_items.get("usage", None)
|
||||||
|
|
||||||
if usages:
|
if usages:
|
||||||
|
|
Loading…
Reference in a new issue