summary refs log tree commit diff
path: root/synapse/app/homeserver.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-28 14:32:05 +0000
committerErik Johnston <erik@matrix.org>2016-01-28 14:32:05 +0000
commit7ed2bbeb11d99ef97672497879e480f91db9b99b (patch)
treecb0d9fc2d3a7fe7db3980d25ed25a3cb2e6ff6ea /synapse/app/homeserver.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into erikj/setup (diff)
downloadsynapse-7ed2bbeb11d99ef97672497879e480f91db9b99b.tar.xz
Clean up a bit. Add comment
Diffstat (limited to 'synapse/app/homeserver.py')
-rwxr-xr-xsynapse/app/homeserver.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index 504557b2fc..65562222cf 100755
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -255,12 +255,13 @@ class SynapseHomeServer(HomeServer):
             quit_with_error(e.message)
 
     def get_db_conn(self):
-        db_conn = self.database_engine.module.connect(
-            **{
-                k: v for k, v in self.db_config.get("args", {}).items()
-                if not k.startswith("cp_")
-            }
-        )
+        # Any param beginning with cp_ is a parameter for adbapi, and should
+        # not be passed to the database engine.
+        db_params = {
+            k: v for k, v in self.db_config.get("args", {}).items()
+            if not k.startswith("cp_")
+        }
+        db_conn = self.database_engine.module.connect(**db_params)
 
         self.database_engine.on_new_connection(db_conn)
         return db_conn