[Zodb-checkins] CVS: Packages/bsddb3Storage - BerkeleyBase.py:1.3
barry@digicool.com
barry@digicool.com
Tue, 3 Apr 2001 14:41:03 -0400 (EDT)
Update of /cvs-repository/Packages/bsddb3Storage
In directory korak:/tmp/cvs-serv13299
Modified Files:
BerkeleyBase.py
Log Message:
tpc_vote(): Transaction passed in must be the same object as the one
given by tpc_begin().
_finish(), _abort(): Fix typos.
--- Updated File BerkeleyBase.py in package Packages/bsddb3Storage --
--- BerkeleyBase.py 2001/03/30 00:16:09 1.2
+++ BerkeleyBase.py 2001/04/03 18:41:01 1.3
@@ -150,6 +150,9 @@
def tpc_vote(self, transaction):
# BAW: This wrapper framework should probably be in BaseStorage's
# tpc_vote()
+ if transaction is not self._transaction:
+ raise POSException.StorageTransactionError(self, transaction)
+
self._lock_acquire()
try:
self._vote(transaction)
@@ -170,9 +173,9 @@
These are all ignored.
"""
- self._txn.commit()
+ self._transaction.commit()
- def _abort(self, tid, user, desc, ext):
+ def _abort(self):
"""Called from BaseStorage.tpc_abort(), this aborts the underlying
BSDDB transaction.
@@ -185,7 +188,7 @@
"""
# BAW: this appears to be broken. Look in BaseStorage.tpc_abort();
# _abort() is never called with any arguments. :/
- self._txn.abort()
+ self._transaction.abort()
def _clear_temp(self):
"""Called from BaseStorage.tpc_abort(), BaseStorage.tpc_begin(),