Author: phd
Date: 2006-02-07 10:08:08 -0700 (Tue, 07 Feb 2006)
New Revision: 1584
Modified:
SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py
Log:
Applied the patch 1380405: enable check_same_thread option in SQLiteConnection.
Modified: SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py 2006-02-07 16:30:50 UTC (rev 1583)
+++ SQLObject/trunk/sqlobject/sqlite/sqliteconnection.py 2006-02-07 17:08:08 UTC (rev 1584)
@@ -29,7 +29,6 @@
if not using_sqlite2:
raise ValueError(
"You must use sqlite2 to use in-memory databases")
- #kw.setdefault('check_same_thread', False)
# connection options
opts = {}
if using_sqlite2:
@@ -63,6 +62,8 @@
opts['mode'] = int(popKey(kw, 'mode'), 0)
if 'timeout' in kw:
opts['timeout'] = float(popKey(kw, 'timeout'))
+ if 'check_same_thread' in kw:
+ opts["check_same_thread"] = bool(popKey(kw, 'check_same_thread'))
# use only one connection for sqlite - supports multiple)
# cursors per connection
self._connOptions = opts
|