Esempio n. 1
0
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
Esempio n. 2
0
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)