Fix maria engine to correctly recognize deadlocks

This commit is contained in:
Erik Johnston 2015-04-08 13:10:54 +01:00
parent d5e7e6b9b6
commit 24d8134ac1
1 changed files with 2 additions and 2 deletions

View File

@ -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