예제 #1
0
파일: update_costs.py 프로젝트: nomed/ebetl
def load_config(args):
    if len(args) == 0:
        # Assume the .ini file is ./development.ini
        config_file = 'development.ini'
        if not os.path.isfile(config_file):
            raise BadCommand('%sError: CONFIG_FILE not found at: .%s%s\n'
                             'Please specify a CONFIG_FILE' % \
                             (self.parser.get_usage(), os.path.sep,
                              config_file))
    else:
        config_file = args[0]
    config_name = 'config:%s' % config_file
    here_dir = os.getcwd()
    conf = appconfig(config_name, relative_to=here_dir)
    load_environment(conf.global_conf, conf.local_conf)
    return conf
예제 #2
0
파일: __init__.py 프로젝트: nomed/ebetl
def setup_app(command, conf, vars):
    """Place any commands to setup ebetl here"""
    load_environment(conf.global_conf, conf.local_conf)
    setup_schema(command, conf, vars)
    bootstrap.bootstrap(command, conf, vars)