Skip to content
Snippets Groups Projects
Commit addb2955 authored by Seblu's avatar Seblu
Browse files

usage check if command exist before request usage

parent 01c4b4d8
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,8 @@ class Command_usage(Command):
def __call__(self, argv):
if len(argv) != 2:
raise cmdBadArgument()
if argv[1] not in self.cli.commands:
raise cmdBadArgument(argv[1])
usage = self.cli.commands.usage(argv[1])
if usage is None:
self.printer.out("No usage.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment