database.py 文件源码

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

项目:fingerprint-securedrop 作者: freedomofpress 项目源码 文件源码
def __init__(self, database_config=None):
        if not database_config:
            database_config = get_config()['database']

        try:
            self.engine = create_engine(
                'postgresql://{pguser}:@{pghost}:{pgport}/{pgdatabase}'.format(
                    **database_config))
        except OperationalError as exc:
            panic("fingerprint-securedrop Postgres support relies on use of a "
                  "PGPASSFILE. Make sure this file exists in your homedir with "
                  "0600 permissions:\n{}.".format(exc))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号