From 3d60d59510f55b2ab830d44bc1315982e878f7d1 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 29 Dec 2018 21:38:03 +0000 Subject: [PATCH] We need to normalise between a single usage string and multiple (making both lists) to reuse the formatting code (commands.py) --- modules/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: