]> git.etc.gen.nz Git - whoisi.git/commitdiff
Switch from pyPgSQL.PgSQL to pyscopg2.
authorAndrew Ruthven <andrew@etc.gen.nz>
Mon, 22 Jun 2009 09:23:12 +0000 (21:23 +1200)
committerAndrew Ruthven <andrew@etc.gen.nz>
Mon, 22 Jun 2009 09:33:59 +0000 (21:33 +1200)
controller-service
services/master/database.py

index 899053a51d019ca058a62a1eec1558e6568204e7..ec7159af82f4fb3dde1dbfadf34a91df27562431 100755 (executable)
@@ -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"),
index ab7c7eb6ed63690eaf7c6bf52ceb030d60eae5f8..f78bea0487c24555d9dbc958ed481b0cda5c3efe 100644 (file)
@@ -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"),