fixed Issue 1500:MySQL driver unable to handle IntegrityError, thanks wheresgatsby

This commit is contained in:
mdipierro
2013-05-24 08:35:09 -05:00
parent 4147867098
commit 4f6ab86491
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -2522,6 +2522,9 @@ class MySQLAdapter(BaseAdapter):
self.execute('select last_insert_id();')
return int(self.cursor.fetchone()[0])
def integrity_error_class(self):
return self.cursor.IntegrityError
class PostgreSQLAdapter(BaseAdapter):
drivers = ('psycopg2','pg8000')