[Zodb-checkins] CVS: ZEO/ZEO - TransactionBuffer.py:1.3.2.4
Jeremy Hylton
jeremy@zope.com
Mon, 28 Jan 2002 16:58:24 -0500
Update of /cvs-repository/ZEO/ZEO
In directory cvs.zope.org:/tmp/cvs-serv1986
Modified Files:
Tag: Standby-branch
TransactionBuffer.py
Log Message:
Add close() method to TransactionBuffer.
Give the TemporaryFile a suffix so we know who to blame.
=== ZEO/ZEO/TransactionBuffer.py 1.3.2.3 => 1.3.2.4 ===
def __init__(self):
- self.file = tempfile.TemporaryFile()
+ self.file = tempfile.TemporaryFile(suffix=".tbuf")
self.count = 0
self.size = 0
# It's safe to use a fast pickler because the only objects
# stored are builtin types -- strings or None.
self.pickler = cPickle.Pickler(self.file, 1)
self.pickler.fast = 1
+
+ def close(self):
+ self.file.close()
def store(self, oid, version, data):
"""Store oid, version, data for later retrieval"""