[SQL-CVS] r1808 - SQLObject/branches/0.7-bugfix/sqlobject/sqlite
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2006-06-14 14:46:57
|
Author: phd Date: 2006-06-14 08:46:47 -0600 (Wed, 14 Jun 2006) New Revision: 1808 Modified: SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py Log: A patch by Dan Pascu <da...@ag...> for sqlite timeout specification. Modified: SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py =================================================================== --- SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py 2006-06-14 14:46:29 UTC (rev 1807) +++ SQLObject/branches/0.7-bugfix/sqlobject/sqlite/sqliteconnection.py 2006-06-14 14:46:47 UTC (rev 1808) @@ -61,7 +61,10 @@ if 'mode' in kw: opts['mode'] = int(popKey(kw, 'mode'), 0) if 'timeout' in kw: - opts['timeout'] = float(popKey(kw, 'timeout')) + if using_sqlite2: + opts['timeout'] = float(popKey(kw, 'timeout')) + else: + opts['timeout'] = int(float(popKey(kw, 'timeout')) * 1000) if 'check_same_thread' in kw: opts["check_same_thread"] = bool(popKey(kw, 'check_same_thread')) # use only one connection for sqlite - supports multiple) |