Loading cccli/command.py +10 −4 Original line number Diff line number Diff line Loading @@ -119,12 +119,16 @@ class Aliases(dict): fparser.write(open(filename, "w")) def substitute(self, argv): # trip is the number of subtitution of an alias # maximum number of trip is set to 10 for trip in range(10): if argv[0] in self: oldargv = argv[1:] argv = shlex.split(self[argv[0]]) argv.extend(oldargv) return argv class Command(object): '''Base of all command class''' Loading Loading @@ -187,6 +191,7 @@ class OptionCommand(Command): '''Proxy to OptionParser''' self.optionparser.set_usage(*args, **kwargs) class RemoteCommand(OptionCommand): '''Command which needs connection to server''' Loading Loading @@ -229,6 +234,7 @@ class RemoteCommand(OptionCommand): pls.append("%s%s:%s%s"%(self.tdtc(tn), tn, self.tdc(tn), self.tdr(tn, tl[tn]))) self.printer.out("%s%s"%(" ".join(pls), color["reset"])) class TqlCommand(RemoteCommand): '''Command which handle TQL stuff''' Loading Loading
cccli/command.py +10 −4 Original line number Diff line number Diff line Loading @@ -119,12 +119,16 @@ class Aliases(dict): fparser.write(open(filename, "w")) def substitute(self, argv): # trip is the number of subtitution of an alias # maximum number of trip is set to 10 for trip in range(10): if argv[0] in self: oldargv = argv[1:] argv = shlex.split(self[argv[0]]) argv.extend(oldargv) return argv class Command(object): '''Base of all command class''' Loading Loading @@ -187,6 +191,7 @@ class OptionCommand(Command): '''Proxy to OptionParser''' self.optionparser.set_usage(*args, **kwargs) class RemoteCommand(OptionCommand): '''Command which needs connection to server''' Loading Loading @@ -229,6 +234,7 @@ class RemoteCommand(OptionCommand): pls.append("%s%s:%s%s"%(self.tdtc(tn), tn, self.tdc(tn), self.tdr(tn, tl[tn]))) self.printer.out("%s%s"%(" ".join(pls), color["reset"])) class TqlCommand(RemoteCommand): '''Command which handle TQL stuff''' Loading