mirror of
https://github.com/django/django.git
synced 2025-10-29 16:46:11 +00:00
Fixed #1673 -- Every database backend now raises ImproperlyConfigured if the relevant Python database module raises ImportError
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2993 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -5,7 +5,11 @@ Requires psycopg 1: http://initd.org/projects/psycopg1
|
||||
"""
|
||||
|
||||
from django.db.backends import util
|
||||
import psycopg as Database
|
||||
try:
|
||||
import psycopg as Database
|
||||
except ImportError, e:
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
raise ImproperlyConfigured, "Error loading psycopg module: %s" % e
|
||||
|
||||
DatabaseError = Database.DatabaseError
|
||||
|
||||
|
||||
Reference in New Issue
Block a user