summaryrefslogtreecommitdiff
path: root/django/db/backends/base/features.py
diff options
context:
space:
mode:
authorSimon Charette <charettes@users.noreply.github.com>2017-10-06 12:47:08 -0400
committerTim Graham <timograham@gmail.com>2017-10-06 12:47:08 -0400
commit9d93dff33338c90a55f7158fbbe0d82e88e13fa3 (patch)
treee82f2500e84877ddf0aa303a0756cf01cf8e6a1f /django/db/backends/base/features.py
parent7d8d630e37209eba672d5382cc2effe192ab2510 (diff)
Fixed #28665 -- Change some database exceptions to NotImplementedError per PEP 249.
Diffstat (limited to 'django/db/backends/base/features.py')
-rw-r--r--django/db/backends/base/features.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/backends/base/features.py b/django/db/backends/base/features.py
index 3a89cc0900..3706e12db1 100644
--- a/django/db/backends/base/features.py
+++ b/django/db/backends/base/features.py
@@ -1,5 +1,5 @@
from django.db.models.aggregates import StdDev
-from django.db.utils import ProgrammingError
+from django.db.utils import NotSupportedError, ProgrammingError
from django.utils.functional import cached_property
@@ -269,9 +269,9 @@ class BaseDatabaseFeatures:
"""Confirm support for STDDEV and related stats functions."""
try:
self.connection.ops.check_expression_support(StdDev(1))
- return True
- except NotImplementedError:
+ except NotSupportedError:
return False
+ return True
def introspected_boolean_field_type(self, field=None):
"""