conf.py: deal siteconf when set in init
authorGui Chen <gui.chen@intel.com>
Fri, 16 Dec 2011 07:35:23 +0000 (15:35 +0800)
committerGui Chen <gui.chen@intel.com>
Fri, 16 Dec 2011 07:35:23 +0000 (15:35 +0800)
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/conf.py

index dc241a0..25bd90e 100644 (file)
@@ -58,10 +58,16 @@ class ConfigMgr(object):
         # reset config options
         self.reset()
 
-        if not siteconf:
-            # initial options from siteconf
+        # initial options from siteconf
+        if siteconf:
+            self._siteconf = siteconf
+        else:
+            # use default site config
             self._siteconf = DEFAULT_GSITECONF
 
+        if ksconf:
+            self._ksconf = ksconf
+
     def reset(self):
         self.__ksconf = None
         self.__siteconf = None