From f53801b2b535dc90e0d92ce45153876c7cae1242 Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Fri, 7 Jan 2022 11:38:31 +0000 Subject: Use `setattr` because direct assignment fails --- synapse/storage/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'synapse/storage/database.py') diff --git a/synapse/storage/database.py b/synapse/storage/database.py index 319c451856..1c1d76520f 100644 --- a/synapse/storage/database.py +++ b/synapse/storage/database.py @@ -107,7 +107,7 @@ def make_pool( with LoggingContext("db.on_new_connection"): # HACK Patch the connection's commit function so that we can see # how long it's taking from Jaeger. - conn.commit = trace(conn.commit, "db.conn.commit") + setattr(conn, "commit", trace(conn.commit, "db.conn.commit")) engine.on_new_connection( LoggingDatabaseConnection(conn, engine, "on_new_connection") -- cgit 1.5.1