storage: use sqlite from either python2.5's stdlib or the pysqlite2 package

This commit is contained in:
Brian Warner 2007-08-28 23:28:52 -07:00
parent 2a63fe8b01
commit a605fe5cad
1 changed files with 8 additions and 1 deletions

View File

@ -11,7 +11,14 @@ from allmydata.interfaces import RIStorageServer, RIBucketWriter, \
from allmydata.util import fileutil, idlib, mathutil
from allmydata.util.assertutil import precondition
from pysqlite2 import dbapi2 as sqlite
try:
# python2.5 ships with sqlite builtin
import sqlite3.dbapi2
sqlite = sqlite3.dbapi2
except ImportError:
# for python2.4, it's installed under a different name
import pysqlite2.dbapi2
sqlite = pysqlite2.dbapi2
# store/
# store/owners.db