Commit 8c766369 authored by Seblu's avatar Seblu
Browse files

import * only allowed at module level

parent 5c11d336
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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)