Thread: [SQL-CVS] r3870 - in SQLObject/branches/0.9: docs sqlobject/sqlite
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2009-04-29 16:05:57
|
Author: phd Date: 2009-04-29 10:05:52 -0600 (Wed, 29 Apr 2009) New Revision: 3870 Modified: SQLObject/branches/0.9/docs/News.txt SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py Log: A bug in SQLiteConnection.columnsFromSchema() that led to an infinite loop was fixed. Modified: SQLObject/branches/0.9/docs/News.txt =================================================================== --- SQLObject/branches/0.9/docs/News.txt 2009-04-29 15:22:54 UTC (rev 3869) +++ SQLObject/branches/0.9/docs/News.txt 2009-04-29 16:05:52 UTC (rev 3870) @@ -39,6 +39,9 @@ without this calling Transaction.close() calls connection.close() which is wrong. +* A bug in SQLiteConnection.columnsFromSchema() that led to an infinite + loop was fixed. + SQLObject 0.9.9 =============== Modified: SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py =================================================================== --- SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py 2009-04-29 15:22:54 UTC (rev 3869) +++ SQLObject/branches/0.9/sqlobject/sqlite/sqliteconnection.py 2009-04-29 16:05:52 UTC (rev 3870) @@ -312,9 +312,11 @@ if not colData: raise ValueError('The table %s was not found in the database. Load failed.' % tableName) colData = colData[0].split('(', 1)[1].strip()[:-2] - while colData.find('(') > -1: + while True: start = colData.find('(') + if start == -1: break end = colData.find(')', start) + if end == -1: break colData = colData[:start] + colData[end+1:] results = [] for colDesc in colData.split(','): |