[SQL-CVS] r1446 - SQLObject/trunk/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: <sub...@co...> - 2005-12-30 22:27:50
|
Author: phd
Date: 2005-12-30 22:27:41 +0000 (Fri, 30 Dec 2005)
New Revision: 1446
Modified:
SQLObject/trunk/sqlobject/dbconnection.py
Log:
A patch by Aaditya Sood and Kevin Dangoor for the case
where self._obsolete is accessed during __init__() - it must be already there.
Modified: SQLObject/trunk/sqlobject/dbconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/dbconnection.py 2005-12-30 20:36:19 UTC (rev 1445)
+++ SQLObject/trunk/sqlobject/dbconnection.py 2005-12-30 22:27:41 UTC (rev 1446)
@@ -778,11 +778,11 @@
class Transaction(object):
def __init__(self, dbConnection):
+ self._obsolete = False
self._dbConnection = dbConnection
self._connection = dbConnection.getConnection()
self._dbConnection._setAutoCommit(self._connection, 0)
self.cache = CacheSet(cache=dbConnection.doCache)
- self._obsolete = False
def assertActive(self):
assert not self._obsolete, "This transaction has already gone through ROLLBACK; begin another transaction"
|