From 24d8134ac135cbbd1f49b8cefacad431ed8f9d71 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 8 Apr 2015 13:10:54 +0100 Subject: Fix maria engine to correctly recognize deadlocks --- synapse/storage/engines/maria.py | 4 ++-- 1 file 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 -- cgit 1.4.1