diff options
| author | Michael Manfre <mmanfre@gmail.com> | 2013-09-23 20:17:59 -0400 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2013-09-25 21:47:26 +0300 |
| commit | 99c87f1410106ce543a1a0332428afc472beef7f (patch) | |
| tree | ee2c17e7f246e842ede59c45af504209c036170d /django/db/backends/__init__.py | |
| parent | 04a2a6b0f9cb6bb98edfe84bf4361216d60a4e38 (diff) | |
Fixed #17671 - Cursors are now context managers.
Diffstat (limited to 'django/db/backends/__init__.py')
| -rw-r--r-- | django/db/backends/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py index 131a73715d..74046a0d9b 100644 --- a/django/db/backends/__init__.py +++ b/django/db/backends/__init__.py @@ -1,7 +1,7 @@ import datetime import time -from django.db.utils import DatabaseError +from django.db.utils import DatabaseError, ProgrammingError try: from django.utils.six.moves import _thread as thread @@ -664,6 +664,9 @@ class BaseDatabaseFeatures(object): # Does the backend require a connection reset after each material schema change? connection_persists_old_columns = False + # What kind of error does the backend throw when accessing closed cursor? + closed_cursor_error_class = ProgrammingError + def __init__(self, connection): self.connection = connection |
