Changeset 897

Show
Ignore:
Timestamp:
01/15/12 16:18:01 (16 months ago)
Author:
jjr8
Message:

Fixed Python 2.4 build breaks.

Location:
MGET/Branches/Jason/PythonPackage/src/GeoEco/Datasets
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • MGET/Branches/Jason/PythonPackage/src/GeoEco/Datasets/SpatiaLite.py

    r896 r897  
    2121import datetime 
    2222import os 
    23 import sqlite3      # Only used to retrieve constants needed when this module is imported. 
    2423import types 
    2524 
     
    2928from GeoEco.DynamicDocString import DynamicDocString 
    3029from GeoEco.Internationalization import _ 
     30 
     31# We also need some SQLite constants, which are defined in the sqlite3 
     32# module, only present in Python 2.5 and later. Try to import that 
     33# module. If we don't get it, define a class with those constants as 
     34# attributes, so the rest of our code will work. 
     35 
     36try: 
     37    import sqlite3 
     38except: 
     39    class sqlite3(object): 
     40        PARSE_DECLTYPES = 1 
     41        PARSE_COLNAMES = 2 
    3142 
    3243 
  • MGET/Branches/Jason/PythonPackage/src/GeoEco/Datasets/__init__.py

    r896 r897  
    11601160 
    11611161 
    1162 class Database(): 
     1162class Database(object): 
    11631163    __doc__ = DynamicDocString() 
    11641164