__main__.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:simphony-remote 作者: simphony 项目源码 文件源码
def user(ctx):
    """Subcommand to manage users."""
    db = ctx.obj.db
    db_url = db.url

    # sqlite driver for sqlalchemy creates an empty file on commit as a side
    # effect. We don't want this creation to happen, so before attempting
    # the creation we stop short if we already find out that the file is
    # missing and cannot possibly be initialized.
    if is_sqlitedb_url(db_url) and not sqlitedb_present(db_url):
        raise click.UsageError("Could not find database at {}".format(db_url))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号