~ubuntu-branches/debian/sid/python-django/sid

« back to all changes in this revision

Viewing changes to django/contrib/gis/db/backends/oracle/introspection.py

  • Committer: Package Import Robot
  • Author(s): Luke Faraone
  • Date: 2013-11-07 15:33:49 UTC
  • mfrom: (1.3.12)
  • Revision ID: package-import@ubuntu.com-20131107153349-e31sc149l2szs3jb
Tags: 1.6-1
* New upstream version. Closes: #557474, #724637.
* python-django now also suggests the installation of ipython,
  bpython, python-django-doc, and libgdal1.
  Closes: #636511, #686333, #704203
* Set package maintainer to Debian Python Modules Team.
* Bump standards version to 3.9.5, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import cx_Oracle
 
2
import sys
2
3
from django.db.backends.oracle.introspection import DatabaseIntrospection
 
4
from django.utils import six
3
5
 
4
6
class OracleIntrospection(DatabaseIntrospection):
5
7
    # Associating any OBJECTVAR instances with GeometryField.  Of course,
17
19
                               (table_name.upper(), geo_col.upper()))
18
20
                row = cursor.fetchone()
19
21
            except Exception as msg:
20
 
                raise Exception('Could not find entry in USER_SDO_GEOM_METADATA corresponding to "%s"."%s"\n'
21
 
                                'Error message: %s.' % (table_name, geo_col, msg))
 
22
                new_msg = (
 
23
                    'Could not find entry in USER_SDO_GEOM_METADATA '
 
24
                    'corresponding to "%s"."%s"\n'
 
25
                    'Error message: %s.') % (table_name, geo_col, msg)
 
26
                six.reraise(Exception, Exception(new_msg), sys.exc_info()[2])
22
27
 
23
28
            # TODO: Research way to find a more specific geometry field type for
24
29
            # the column's contents.