Loading cccli/commands.py +3 −3 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import ConfigParser import os from cccli.exception import * from cccli.command import * class Commands(object): '''Command manager''' Loading @@ -17,10 +18,9 @@ class Commands(object): # save cli context self.cli = cli # build command list from cccli.command import * self.cmds = dict() for x in [ x for x in locals() if x.startswith("Command_") ]: self.cmds[x[8:]] = locals()[x] for x in [ x for x in globals() if x.startswith("Command_") ]: self.cmds[x[8:]] = globals()[x] def __len__(self): return len(self.cmds) Loading Loading
cccli/commands.py +3 −3 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import ConfigParser import os from cccli.exception import * from cccli.command import * class Commands(object): '''Command manager''' Loading @@ -17,10 +18,9 @@ class Commands(object): # save cli context self.cli = cli # build command list from cccli.command import * self.cmds = dict() for x in [ x for x in locals() if x.startswith("Command_") ]: self.cmds[x[8:]] = locals()[x] for x in [ x for x in globals() if x.startswith("Command_") ]: self.cmds[x[8:]] = globals()[x] def __len__(self): return len(self.cmds) Loading