def _load_service_config(self):
     return dict_map_string(
         load_config(SERVICE_CONFIG_FILE),
         self._substitute_constants)
Exemple #2
0
 def _load_service_config(self):
     return dict_map_string(load_config(SERVICE_CONFIG_FILE),
                            self._substitute_constants)
from util import load_config, dict_map_string
import os
import sys

APPROOT= os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
CONFIG_FILE = os.path.join(APPROOT, "etc", "config.json")

for key, value in dict_map_string(
        load_config(CONFIG_FILE),
        lambda x: x.format(APPROOT=APPROOT)).iteritems():
    setattr(sys.modules[__name__], key, value)
Exemple #4
0
from util import load_config, dict_map_string
import os
import sys

APPROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
CONFIG_FILE = os.path.join(APPROOT, "etc", "config.json")

for key, value in dict_map_string(
        load_config(CONFIG_FILE),
        lambda x: x.format(APPROOT=APPROOT)).iteritems():
    setattr(sys.modules[__name__], key, value)