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

addright take index optional argument

parent 1fc2480d
No related branches found
No related tags found
No related merge requests found
......@@ -50,15 +50,19 @@ class Command_addright(Command):
'''Add or edit account right'''
def __call__(self, argv):
if len(argv) != 5:
if len(argv) == 5:
argv.append(None)
elif len(argv) == 6:
argv[5] = int(argv[5])
else:
raise cmdBadArgument()
try:
self.cli.rpc.call("addright", argv[1], argv[2], argv[3], argv[4])
self.cli.rpc.call("addright", argv[1], argv[2], argv[3], argv[4], argv[5])
except RpcError as e:
raise cmdError("RPCError: %s"%str(e))
def usage(self):
return '''Usage: addright <account tql> <right tql> <method> <target>
return '''Usage: addright <account tql> <right tql> <method> <target> [index]
<method> is the name of the rpc command to allow
<target> can be allow or deny'''
......
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