Commit 52dc3a30 authored by Christian Robottom's avatar Christian Robottom

Change TxnHeader._read_header according to format changes for length in

TRANS_HDR; also fix an import issue deriving from the creation of
ZODB.FileStorage.format. Problem pointed out by Martijn Faassen
<faassen@infrae.com>. r=jeremy
parent e769ca31
......@@ -21,7 +21,7 @@ XXX This file needs to be kept in sync with FileStorage.py.
import cPickle
import struct
from ZODB.FileStorage import TRANS_HDR, DATA_HDR, TRANS_HDR_LEN, \
from ZODB.FileStorage.format import TRANS_HDR, DATA_HDR, TRANS_HDR_LEN, \
DATA_HDR_LEN, DATA_VERSION_HDR_LEN
from ZODB.utils import p64, u64
from persistent.TimeStamp import TimeStamp
......@@ -47,9 +47,8 @@ class TxnHeader:
def _read_header(self):
self._file.seek(self._pos)
self._hdr = self._file.read(TRANS_HDR_LEN)
(self.tid, length, self.status, self.user_len, self.descr_len,
(self.tid, self.length, self.status, self.user_len, self.descr_len,
self.ext_len) = struct.unpack(TRANS_HDR, self._hdr)
self.length = u64(length)
def read_meta(self):
"""Load user, descr, and ext attributes."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment