Loading cccli/command/right.py +2 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ class Command_rights(TqlCommand): self.tql_filter += "&a&r=cli" self.remove_option("--direct") self.remove_option("--quiet") self.remove_option("--index") def __call__(self, argv): # Parse argline Loading @@ -28,14 +29,11 @@ class Command_rights(TqlCommand): tql = "a=%s"%self.cli.settings["login"] else: tql = "".join(self.args) # update tql if mode if not self.options.raw: tql += "&a" # ask server al = self.rpccall("rights", tql, _direct=True, _status=False) # display answer for (a, rl) in al.items(): self.printer.out("rights of %s%s%s"%(self.tdc("a"), a, color["reset"])) self.printer.out("%sa:%s%s%s"%(self.tdtc("a"), self.tdc("a"), a, color["reset"])) for i,r in enumerate(rl): tags = " ".join([ "%s%s:%s%s"%(self.tdtc(t), t, self.tdc(t), v) for (t,v) in r.items() ]) self.printer.out("[%s] %s%s"%(i,tags, color["reset"])) Loading Loading
cccli/command/right.py +2 −4 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ class Command_rights(TqlCommand): self.tql_filter += "&a&r=cli" self.remove_option("--direct") self.remove_option("--quiet") self.remove_option("--index") def __call__(self, argv): # Parse argline Loading @@ -28,14 +29,11 @@ class Command_rights(TqlCommand): tql = "a=%s"%self.cli.settings["login"] else: tql = "".join(self.args) # update tql if mode if not self.options.raw: tql += "&a" # ask server al = self.rpccall("rights", tql, _direct=True, _status=False) # display answer for (a, rl) in al.items(): self.printer.out("rights of %s%s%s"%(self.tdc("a"), a, color["reset"])) self.printer.out("%sa:%s%s%s"%(self.tdtc("a"), self.tdc("a"), a, color["reset"])) for i,r in enumerate(rl): tags = " ".join([ "%s%s:%s%s"%(self.tdtc(t), t, self.tdc(t), v) for (t,v) in r.items() ]) self.printer.out("[%s] %s%s"%(i,tags, color["reset"])) Loading