Correctly identify deadlocks

This commit is contained in:
Erik Johnston 2015-04-15 10:23:42 +01:00
parent 63677d1f47
commit c756dfeb14

View File

@ -37,7 +37,7 @@ class PostgresEngine(object):
def is_deadlock(self, error):
if isinstance(error, self.module.DatabaseError):
return error.pgcode == "40P01"
return error.pgcode in ["40001", "40P01"]
return False
def load_unicode(self, v):