summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-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