mirror of
https://github.com/django/django.git
synced 2025-09-10 04:26:30 +00:00
Fixed #17513 -- Prevented the MySQL backend from leaking MySQLdb-specific exceptions. Thanks Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
f46003559c
commit
ca187fea88
2 changed files with 7 additions and 1 deletions
|
@ -119,7 +119,7 @@ class CursorWrapper(object):
|
|||
# misclassified and Django would prefer the more logical place.
|
||||
if e[0] in self.codes_for_integrityerror:
|
||||
raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
|
||||
raise
|
||||
raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), sys.exc_info()[2]
|
||||
except Database.DatabaseError, e:
|
||||
raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), sys.exc_info()[2]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue