~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/changecache.py

[rs=mwhudson] Merge from trunk, 1.6 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
with_lock = util.with_lock('_lock', 'ChangeCache')
35
35
 
36
 
SQLITE_INTERFACE = os.environ.get('SQLITE_INTERFACE', 'sqlite')
 
36
SQLITE_INTERFACE = os.environ.get('SQLITE_INTERFACE', 'sqlite3')
37
37
 
38
 
if SQLITE_INTERFACE == 'pysqlite2':
39
 
    from pysqlite2 import dbapi2
 
38
if SQLITE_INTERFACE == 'sqlite3':
 
39
    from sqlite3 import dbapi2
40
40
    _param_marker = '?'
41
 
elif SQLITE_INTERFACE == 'sqlite':
42
 
    import sqlite as dbapi2
43
 
    _param_marker = '%s'
44
 
 
45
41
 
46
42
_select_stmt = ("select data from revisiondata where revid = ?"
47
43
                ).replace('?', _param_marker)