Commit a354d36b authored by Kirill Smelkov's avatar Kirill Smelkov

bigfile/zodb: Reuse __setstate__() in ZBlk.__init__()

- we have logic to init ._v_zfile and ._v_blk there

- the same for ._v_blkdata - logic to init it is there + it is better to
  set variables right from instance creation, not hoping "it will be set
  outside from master"

  NOTE ._v_blkdata = None means the block was not yet loaded and
  generally fits into logic how ZBlk operates and thus the change is ok.
parent f696ce92
......@@ -118,9 +118,7 @@ class ZBlk(Persistent):
# ZBlk as initially created (empty placeholder)
def __init__(self):
self._v_zfile = None
self._v_blk = None
# NOTE ._v_blkdata is not set - the master will set it from outside
self.__setstate__(None)
# make this ZBlk know it represents zfile[blk]
......
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