diff --git a/cccli/commands.py b/cccli/commands.py index 31c7fb1a8f3c263e0edc0f8fa21567eeab0c3511..f359a3e83f4d9b4db88ce6376d5d1a63c622cfb8 100644 --- a/cccli/commands.py +++ b/cccli/commands.py @@ -9,6 +9,7 @@ import ConfigParser import os from cccli.exception import * +from cccli.command import * class Commands(object): '''Command manager''' @@ -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)