[SQL-CVS] r1585 - SQLObject/branches/0.7-bugfix/sqlobject/sqlite
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2006-02-07 18:21:49
|
Author: phd Date: 2006-02-07 10:08:42 -0700 (Tue, 07 Feb 2006) New Revision: 1585 Modified: SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py Log: Applied the patch 1380405: enable check_same_thread option in SQLiteConnection. Modified: SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py =================================================================== --- SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py 2006-02-07 17:08:08 UTC (rev 1584) +++ SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py 2006-02-07 17:08:42 UTC (rev 1585) @@ -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 |