summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql
diff options
context:
space:
mode:
authorAdam Chainz <me@adamj.eu>2016-09-26 23:31:41 +0100
committerTim Graham <timograham@gmail.com>2016-09-26 18:31:41 -0400
commit85f2bba7ebd98fddaeb7451e733685022aae21cf (patch)
tree501c947fed8ba656467a02328888886f22b41c7f /django/db/backends/postgresql
parent6fe846a8f08dc959003f298b5407e321c6fe3735 (diff)
Removed DatabaseError and IntegrityError declarations from database backends.
Unused since 11ee9746a0530ec38f523fb4de44950d9b783877.
Diffstat (limited to 'django/db/backends/postgresql')
-rw-r--r--django/db/backends/postgresql/base.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py
index 1ab05d81f6..d188f37853 100644
--- a/django/db/backends/postgresql/base.py
+++ b/django/db/backends/postgresql/base.py
@@ -44,9 +44,6 @@ from .schema import DatabaseSchemaEditor # NOQA isort:skip
from .utils import utc_tzinfo_factory # NOQA isort:skip
from .version import get_version # NOQA isort:skip
-DatabaseError = Database.DatabaseError
-IntegrityError = Database.IntegrityError
-
if six.PY2:
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
psycopg2.extensions.register_type(psycopg2.extensions.UNICODEARRAY)
@@ -239,7 +236,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
nodb_connection = super(DatabaseWrapper, self)._nodb_connection
try:
nodb_connection.ensure_connection()
- except (DatabaseError, WrappedDatabaseError):
+ except (Database.DatabaseError, WrappedDatabaseError):
warnings.warn(
"Normally Django will use a connection to the 'postgres' database "
"to avoid running initialization queries against the production "