Loading cccli/command/command.py +6 −6 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ class TqlCommand(OptionCommand): if _options["callback"] is not None: _options["callback"](d) if _options["status"]: self.print_objects(d, ("output")) self.print_objects(d, ["output"]) return d except RpcError as e: if _options["exception"]: Loading Loading @@ -206,7 +206,7 @@ class TqlCommand(OptionCommand): if _options["callback"] is not None: _options["callback"](obj) if _options["status"]: self.print_objects(d, ("output")) self.print_objects(d, ["output"]) except RpcError as e: self.printer.error("RPCError: %s"%str(e)) Loading @@ -220,17 +220,17 @@ class TqlCommand(OptionCommand): def print_tags(self, taglist, order=None, ignore=None): '''Display a tag with tagdisplay settings''' _ignore = () if ignore is None else ignore _order = () if order is None else order ignore = () if ignore is None else ignore order = () if order is None else order # copy dict to show tl = taglist.copy() # remove ignore tags for tn in _ignore: for tn in ignore: tl.pop(tn, None) # list to print pls = [] # print firstly order tags for tn in _order: for tn in order: tv = tl.pop(tn, None) if tv is not None: pls.append("%s%s:%s%s"%(self.tdtc(tn), tn, self.tdc(tn), self.tdr(tn, tv))) Loading Loading
cccli/command/command.py +6 −6 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ class TqlCommand(OptionCommand): if _options["callback"] is not None: _options["callback"](d) if _options["status"]: self.print_objects(d, ("output")) self.print_objects(d, ["output"]) return d except RpcError as e: if _options["exception"]: Loading Loading @@ -206,7 +206,7 @@ class TqlCommand(OptionCommand): if _options["callback"] is not None: _options["callback"](obj) if _options["status"]: self.print_objects(d, ("output")) self.print_objects(d, ["output"]) except RpcError as e: self.printer.error("RPCError: %s"%str(e)) Loading @@ -220,17 +220,17 @@ class TqlCommand(OptionCommand): def print_tags(self, taglist, order=None, ignore=None): '''Display a tag with tagdisplay settings''' _ignore = () if ignore is None else ignore _order = () if order is None else order ignore = () if ignore is None else ignore order = () if order is None else order # copy dict to show tl = taglist.copy() # remove ignore tags for tn in _ignore: for tn in ignore: tl.pop(tn, None) # list to print pls = [] # print firstly order tags for tn in _order: for tn in order: tv = tl.pop(tn, None) if tv is not None: pls.append("%s%s:%s%s"%(self.tdtc(tn), tn, self.tdc(tn), self.tdr(tn, tv))) Loading