Superuser specification: only overwrite values if specified.

This commit is contained in:
Feike Steenbergen
2016-02-01 14:58:40 +01:00
parent b724757b8a
commit a5207e7d57
+1 -1
View File
@@ -131,7 +131,7 @@ class Postgresql:
def connection(self):
if not self._connection or self._connection.closed != 0:
r = parseurl('postgres://{}/postgres'.format(self.local_address))
r['user'] = self.superuser['user']
r.update(self.superuser)
self._connection = psycopg2.connect(**r)
self._connection.autocommit = True
self.server_version = self._connection.server_version