summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShai Berger <shai@platonix.com>2013-07-30 03:21:06 +0300
committerShai Berger <shai@platonix.com>2013-07-30 03:21:06 +0300
commit6ed579e7eb6e1eda3dd1b0afb306d58b9498bfa0 (patch)
tree10a805b0c82f36a7b473172777b5d377fa7f234b
parent05ea5a213935b6f1c02f634b6a7674bd2f296458 (diff)
Fixed #20785 -- Corrected exception caught for Oracle LIKE operator detection
The code that tests to see which LIKE expressions to use now runs using non-error-wrapped cursor, so cx_Oracle exceptions need to be caught rather than Django DatabaseErrors. Thanks Trac user ludo for report and initial patch.
-rw-r--r--django/db/backends/oracle/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py
index 2d51d24b58..2786d05f79 100644
--- a/django/db/backends/oracle/base.py
+++ b/django/db/backends/oracle/base.py
@@ -578,7 +578,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
cursor.execute("SELECT 1 FROM DUAL WHERE DUMMY %s"
% self._standard_operators['contains'],
['X'])
- except utils.DatabaseError:
+ except DatabaseError:
self.operators = self._likec_operators
else:
self.operators = self._standard_operators