diff options
author | Mads Jensen <mje@inducks.org> | 2017-09-26 15:54:24 +0200 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2017-09-29 09:49:55 -0400 |
commit | 8d40eb0e897832254a22433d2daaed01f15f2f06 (patch) | |
tree | f8138af7b1d2417e1644b0d3bc6fee2d3162a021 /django/db/backends/base/operations.py | |
parent | 3e72f4b7b6ff92a78c546115c5ff6fe63661dece (diff) | |
download | django-8d40eb0e897832254a22433d2daaed01f15f2f06.tar.gz |
Used NotSupportedError for some unsupported database opreations per PEP 249.
Diffstat (limited to 'django/db/backends/base/operations.py')
-rw-r--r-- | django/db/backends/base/operations.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/backends/base/operations.py b/django/db/backends/base/operations.py index fd74263a4a..1ddb1010ec 100644 --- a/django/db/backends/base/operations.py +++ b/django/db/backends/base/operations.py @@ -163,7 +163,7 @@ class BaseDatabaseOperations: duplicates. """ if fields: - raise NotImplementedError('DISTINCT ON fields is not supported by this database backend') + raise NotSupportedError('DISTINCT ON fields is not supported by this database backend') else: return 'DISTINCT' @@ -604,7 +604,7 @@ class BaseDatabaseOperations: lhs_sql, lhs_params = lhs rhs_sql, rhs_params = rhs return "(%s - %s)" % (lhs_sql, rhs_sql), lhs_params + rhs_params - raise NotImplementedError("This backend does not support %s subtraction." % internal_type) + raise NotSupportedError("This backend does not support %s subtraction." % internal_type) def window_frame_start(self, start): if isinstance(start, int): |