[Zodb-checkins] CVS: ZODB3/ZODB/zodb4 - z4iterator.py:1.1.2.3
Fred L. Drake, Jr.
fred at zope.com
Thu Jan 29 16:30:49 EST 2004
Update of /cvs-repository/ZODB3/ZODB/zodb4
In directory cvs.zope.org:/tmp/cvs-serv25045
Modified Files:
Tag: zope3-zodb3-devel-branch
z4iterator.py
Log Message:
- add missing import
- restore a portion of the FileIterator constructor where too much was
ripped out
=== ZODB3/ZODB/zodb4/z4iterator.py 1.1.2.2 => 1.1.2.3 ===
--- ZODB3/ZODB/zodb4/z4iterator.py:1.1.2.2 Thu Jan 29 15:19:05 2004
+++ ZODB3/ZODB/zodb4/z4iterator.py Thu Jan 29 16:30:47 2004
@@ -17,7 +17,7 @@
from struct import unpack
from ZODB.zodb4.z4interfaces import ZERO
-from ZODB.zodb4.z4utils import u64
+from ZODB.zodb4.z4utils import u64, splitrefs
from ZODB.zodb4.z4format import FileStorageFormatter, DataHeader, TxnHeader
from ZODB.zodb4.z4format import TRANS_HDR, TRANS_HDR_LEN, DATA_HDR
from ZODB.zodb4.z4format import DATA_HDR_LEN, DATA_VERSION_HDR_LEN
@@ -31,8 +31,9 @@
## implements(IStorageIterator)
def __init__(self, file):
- # - modidied to take an open file instead of a filename
# - removed start and stop arguments
+ if isinstance(file, str):
+ file = open(file, 'rb')
self._file = file
self._read_metadata()
self._file.seek(0,2)
More information about the Zodb-checkins
mailing list