Commit d2172906 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8233e180
......@@ -152,14 +152,15 @@ def Trees(zstor, r):
for treetxt in r.readlines():
treetxt = treetxt.rstrip() # trim trailin \n
tree = zctx.TopoDecode(treetxt)
ztree = trees[treetxt] = LOBTree()
ztree = trees[treetxt] = XLOTree()
# tree[k]=v for all k
# do tree.keys() via walkBFS
for level in xbtree._walkBFS(tree):
for node in level:
if isinstance(node, xbtree.Bucket):
assert node.valuev is not None
if node.valuev is None:
panic("%s: tree must be {key->value}, not set" % treetxt)
assert len(node.keyv) == len(node.valuev)
for (k,v) in zip(node.keyv, node.valuev):
ztree[k] = v
......
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