Skip to content
Snippets Groups Projects
Commit 8c766369 authored by Seblu's avatar Seblu
Browse files

import * only allowed at module level

parent 5c11d336
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment