-def get_config(config_filename=None):
- if config_filename is None:
- config_filename = find_config_file()
- ml_conf = SafeConfigParser()
- ml_conf.read(config_filename)
- return ml_conf
+_ml_config = None
+
+
+def get_config(config_path=None):
+ global _ml_config
+ if _ml_config is None:
+ if config_path is None:
+ config_path = find_config_file()
+ _ml_config = RawConfigParser()
+ _ml_config.read(config_path)
+ return _ml_config