From: Bruno T. <bt...@as...> - 2003-07-07 13:20:36
|
Hi there Installing SLQObject 0.4 I found an error: byte-compiling /home/bt/local/lib/python2.1/site-packages/SQLObject/DBConnection.py to DBConnection.pyc File "/home/bt/local/lib/python2.1/site-packages/SQLObject/DBConnection.py", line 142 yield select.sourceClass(result[0]) ^ SyntaxError: invalid syntax The following patch seems to fix the problem, but Im not sure if its the correct fix. []'s Bruno Trevisan bt...@as... |=3D| Async Open Source |=3D| D. Alexandrina, 253= 4 http://www.async.com.br/ |=3D| +55 16 261-2331 |=3D| 13566-290 |=3D| +55 16 9781-8717 |=3D| S=E3o Carlos, SP, B= rasil diff -ur SQLObject-0.4/SQLObject/DBConnection.py SQLObject-0.4.patched/SQLO= bject/DBConnection.py --- SQLObject-0.4/SQLObject/DBConnection.py=09Mon Jun 30 19:43:02 2003 +++ SQLObject-0.4.patched/SQLObject/DBConnection.py=09Mon Jul 7 09:28:10 2= 003 @@ -139,10 +139,10 @@ self.releaseConnection(conn) break if select.ops.get('lazyColumns', 0): - yield select.sourceClass(result[0]) + yield [select.sourceClass(result[0])] else: obj =3D select.sourceClass(result[0], selectResults=3Dresu= lt[1:]) - yield obj + yield [obj] def countSelect(self, select): q =3D "SELECT COUNT(*) FROM %s WHERE %s" % \ |