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:
jesopo 2018-12-29 21:38:03 +00:00
parent ee8d3a6287
commit 3d60d59510

View file

@ -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: