mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
Fixed #3450 -- Exposed IntegrityError in a backend-neutral fashion. This is a
useful error to be able to catch explicitly. Thanks, enlight. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5076 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -12,6 +12,7 @@ except ImportError, e:
|
||||
raise ImproperlyConfigured, "Error loading psycopg2 module: %s" % e
|
||||
|
||||
DatabaseError = Database.DatabaseError
|
||||
IntegrityError = Database.IntegrityError
|
||||
|
||||
try:
|
||||
# Only exists in Python 2.4+
|
||||
|
||||
Reference in New Issue
Block a user