From addb2955831bb22e59e2d7ff9529f83730881588 Mon Sep 17 00:00:00 2001 From: Seblu <sebastien.luttringer@smartjog.com> Date: Mon, 14 Feb 2011 13:14:02 +0100 Subject: [PATCH] usage check if command exist before request usage --- cccli/command/shell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cccli/command/shell.py b/cccli/command/shell.py index cb89deb..886ff1f 100644 --- a/cccli/command/shell.py +++ b/cccli/command/shell.py @@ -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.") -- GitLab