explicitly set localhost upon db connection
This commit is contained in:
parent
33c78cda48
commit
a04d94b50d
1 changed files with 3 additions and 1 deletions
|
@ -87,7 +87,9 @@ class DBConnectionManager:
|
||||||
logger.info("Initialised default config file {}".format(self.config_file))
|
logger.info("Initialised default config file {}".format(self.config_file))
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
conn = psycopg2.connect("dbname={} user={} password={}".format(self.db_name, self.db_user, self.db_pass))
|
conn = psycopg2.connect("dbname='{}' user='{}' password='{}' host='localhost".format(
|
||||||
|
self.db_name, self.db_user, self.db_pass)
|
||||||
|
)
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
self.lazy_conn.set_conn(conn)
|
self.lazy_conn.set_conn(conn)
|
||||||
self.lazy_cur.set_cur(cur)
|
self.lazy_cur.set_cur(cur)
|
||||||
|
|
Loading…
Reference in a new issue