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))
评论列表
文章目录