def _connect(self, database, **kwargs):
if not PYSQLITE_BERKELEYDB:
message = ('Your Python SQLite driver (%s) does not appear to '
'have been compiled against the BerkeleyDB SQLite '
'library.' % berkeleydb)
if LIBSQLITE_BERKELEYDB:
message += (' However, the libsqlite on your system is the '
'BerkeleyDB implementation. Try recompiling '
'pysqlite.')
else:
message += (' Additionally, the libsqlite on your system '
'does not appear to be the BerkeleyDB '
'implementation.')
raise ImproperlyConfigured(message)
conn = berkeleydb.connect(database, **kwargs)
conn.isolation_level = None
self._add_conn_hooks(conn)
return conn
评论列表
文章目录