From 8c7663693e1750a992b682a1c655284facb0dfa7 Mon Sep 17 00:00:00 2001
From: Seblu <sebastien.luttringer@smartjog.com>
Date: Wed, 9 Feb 2011 11:28:15 +0100
Subject: [PATCH] import * only allowed at module level

---
 cccli/commands.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cccli/commands.py b/cccli/commands.py
index 31c7fb1..f359a3e 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)
-- 
GitLab