[SQL-CVS] r1448 - home/phd/SQLObject/paramstyles/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: <sub...@co...> - 2005-12-30 22:28:41
|
Author: phd
Date: 2005-12-30 22:28:35 +0000 (Fri, 30 Dec 2005)
New Revision: 1448
Modified:
home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py
Log:
Merged a patch by Aaditya Sood and Kevin Dangoor from rev. 1446 for the case
where self._obsolete is accessed during __init__() - it must be already there.
Modified: home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py 2005-12-30 22:28:18 UTC (rev 1447)
+++ home/phd/SQLObject/paramstyles/sqlobject/dbconnection.py 2005-12-30 22:28:35 UTC (rev 1448)
@@ -791,11 +791,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"
|