Commit addb2955 authored by Seblu's avatar Seblu
Browse files

usage check if command exist before request usage

parent 01c4b4d8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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.")