summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-08 13:10:54 +0100
committerErik Johnston <erik@matrix.org>2015-04-08 13:10:54 +0100
commit24d8134ac135cbbd1f49b8cefacad431ed8f9d71 (patch)
tree5d9efbfaa9e33692456470051eb1bfc2833c6761 /synapse
parentMerge branch 'develop' of github.com:matrix-org/synapse into mysql (diff)
downloadsynapse-24d8134ac135cbbd1f49b8cefacad431ed8f9d71.tar.xz
Fix maria engine to correctly recognize deadlocks
Diffstat (limited to '')
-rw-r--r--synapse/storage/engines/maria.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/engines/maria.py b/synapse/storage/engines/maria.py
index a279bfaf44..230b32858c 100644
--- a/synapse/storage/engines/maria.py
+++ b/synapse/storage/engines/maria.py
@@ -42,6 +42,6 @@ class MariaEngine(object):
         prepare_database(db_conn, self)
 
     def is_deadlock(self, error):
-        if isinstance(error, self.module.InternalError):
-            return error.sqlstate == 40001 and error.errno == 1213
+        if isinstance(error, self.module.DatabaseError):
+            return error.sqlstate == "40001" and error.errno == 1213
         return False