From: Andrew Ruthven Date: Mon, 22 Jun 2009 09:23:12 +0000 (+1200) Subject: Switch from pyPgSQL.PgSQL to pyscopg2. X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45141172153d8c7585dca1e3c9b0cd5836231614;p=whoisi.git Switch from pyPgSQL.PgSQL to pyscopg2. --- diff --git a/controller-service b/controller-service index 899053a..ec7159a 100755 --- a/controller-service +++ b/controller-service @@ -37,7 +37,7 @@ import services.config as config class Controller(pb.Root): def service_setup(self): - self.connection_type = "pyPgSQL.PgSQL" + self.connection_type = "psycopg2" self.connection_dict = dict(cp_reconnect=True, host=config.get("db", "host"), user=config.get("db", "user"), diff --git a/services/master/database.py b/services/master/database.py index ab7c7eb..f78bea0 100644 --- a/services/master/database.py +++ b/services/master/database.py @@ -55,7 +55,7 @@ class DatabaseManager: Start up the connection to the database. """ if self.db is None: - self.db = adbapi.ConnectionPool("pyPgSQL.PgSQL", cp_reconnect=True, + self.db = adbapi.ConnectionPool("psycopg2", cp_reconnect=True, host=config.get("db", "host"), user=config.get("db", "user"), password=config.get("db", "passwd"),