pass password to postgresql on connection

This commit is contained in:
Maximilian Keßler 2023-07-05 22:38:41 +02:00
parent 53b31c2c44
commit 33c78cda48
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -87,7 +87,7 @@ 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={}".format(self.db_name, self.db_user, self.db_pass)) conn = psycopg2.connect("dbname={} user={} password={}".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)