Exemplo n.º 1
0
def setup(args=None):
    if args is None:
        args = []
    conf = cfg.ConfigOpts()
    logging.register_options(conf)
    conf(args, project='enamel')
    logging.setup(conf, 'enamel')
    for group, options in opts.list_opts():
        conf.register_opts(list(options),
                           group=None if group == "DEFAULT" else group)

    return conf
Exemplo n.º 2
0
def main(args=sys.argv[1:]):
    conf = cfg.ConfigOpts()
    conf.register_cli_opt(command_opt)
    db_options.set_defaults(conf)
    for group, options in opts.list_opts():
        conf.register_opts(list(options),
                           group=None if group == 'Default' else group)
    conf(args, project='enamel')
    db_utils.init(conf)
    al_conf = get_alembic_config()
    al_conf.enamel_config = conf

    conf.command.func(al_conf)