Loading cccli/cli.py +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ class Cli(object): self.printer.error("Bad argument.") usage = self.commands.usage(argv[0]) if usage != "": self.printer.out("usage: %s."%usage) self.printer.out(usage) except cmdBadName: self.printer.error("No command: %s."%argv[0]) except cmdWarning as e: Loading cccli/command/right.py +7 −4 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ from cccli.command.command import Command from optparse import OptionParser class Command_rights(Command): '''List account rights (current by default)''' '''List account rights''' def __call__(self, argv): # Parse argline Loading Loading @@ -49,7 +49,7 @@ class Command_rights(Command): class Command_addright(Command): '''Add/edit a right''' '''Add or edit account right''' def __call__(self, argv): if len(argv) != 5: Loading @@ -60,11 +60,14 @@ class Command_addright(Command): raise cmdError("RPCError: %s"%str(e)) def usage(self): return "Usage: addright <tql> <right tql> <method> <target>" return '''Usage: addright <account tql> <right tql> <method> <target> <method> is the name of the rpc command to allow <target> can be allow or deny''' class Command_delright(Command): '''Delete a right''' '''Delete account right''' def __call__(self, argv): if len(argv) != 3: Loading cccli/command/shell.py +5 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ class Command_quit(Command): def __call__(self, argv): raise SystemExit() class Command_version(Command): '''Print cli version''' def __call__(self, argv): Loading Loading @@ -52,8 +53,10 @@ class Command_help(Command): elif len(argv) == 2: if argv[1] not in self.cli.commands: raise cmdBadArgument(argv[1]) self.printer.out(self.cli.commands.help(argv[1])) self.printer.out(self.cli.commands.usage(argv[1])) c = self.cli.commands for u in (c.help(argv[1]), c.usage(argv[1])): if u != "": self.printer.out(u) else: raise cmdBadArgument() Loading Loading
cccli/cli.py +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ class Cli(object): self.printer.error("Bad argument.") usage = self.commands.usage(argv[0]) if usage != "": self.printer.out("usage: %s."%usage) self.printer.out(usage) except cmdBadName: self.printer.error("No command: %s."%argv[0]) except cmdWarning as e: Loading
cccli/command/right.py +7 −4 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ from cccli.command.command import Command from optparse import OptionParser class Command_rights(Command): '''List account rights (current by default)''' '''List account rights''' def __call__(self, argv): # Parse argline Loading Loading @@ -49,7 +49,7 @@ class Command_rights(Command): class Command_addright(Command): '''Add/edit a right''' '''Add or edit account right''' def __call__(self, argv): if len(argv) != 5: Loading @@ -60,11 +60,14 @@ class Command_addright(Command): raise cmdError("RPCError: %s"%str(e)) def usage(self): return "Usage: addright <tql> <right tql> <method> <target>" return '''Usage: addright <account tql> <right tql> <method> <target> <method> is the name of the rpc command to allow <target> can be allow or deny''' class Command_delright(Command): '''Delete a right''' '''Delete account right''' def __call__(self, argv): if len(argv) != 3: Loading
cccli/command/shell.py +5 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ class Command_quit(Command): def __call__(self, argv): raise SystemExit() class Command_version(Command): '''Print cli version''' def __call__(self, argv): Loading Loading @@ -52,8 +53,10 @@ class Command_help(Command): elif len(argv) == 2: if argv[1] not in self.cli.commands: raise cmdBadArgument(argv[1]) self.printer.out(self.cli.commands.help(argv[1])) self.printer.out(self.cli.commands.usage(argv[1])) c = self.cli.commands for u in (c.help(argv[1]), c.usage(argv[1])): if u != "": self.printer.out(u) else: raise cmdBadArgument() Loading