1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-11-25 07:40:17 +01:00

dspace_statistics_api/database.py: Don't quote host in connect()

This commit is contained in:
Alan Orth 2018-11-03 22:43:05 +02:00
parent 69bcd1b5e4
commit 70dfcb93c5
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -6,7 +6,7 @@ from .config import DATABASE_PORT
import psycopg2, psycopg2.extras import psycopg2, psycopg2.extras
def database_connection(): def database_connection():
connection = psycopg2.connect("dbname={} user={} password={} host='{}' port={}".format(DATABASE_NAME, DATABASE_USER, DATABASE_PASS, DATABASE_HOST, DATABASE_PORT), cursor_factory=psycopg2.extras.DictCursor) connection = psycopg2.connect("dbname={} user={} password={} host={} port={}".format(DATABASE_NAME, DATABASE_USER, DATABASE_PASS, DATABASE_HOST, DATABASE_PORT), cursor_factory=psycopg2.extras.DictCursor)
return connection return connection