Commit 18b46d86 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 572e2e21
......@@ -349,9 +349,12 @@ def Restructure(ztree, newStructure):
if len(zrlevelv) > 0:
zrlevel = zrlevelv.pop(0)
print('ZRLEVEL:', zrlevel)
# filter-out buckets to be processed in the end
zrbucketv, zrlevel = _filter2(zrlevel, lambda zrn: isinstance(zrn.node, zbucketType))
rbucketv, rlevel = _filter2(rlevel, lambda rn: isinstance(rn.node, Bucket))
_, zrlevel = _filter2(zrlevel, lambda zrn: isinstance(zrn.node, zbucketType))
zrbucketv.extend(_)
_, rlevel = _filter2(rlevel, lambda rn: isinstance(rn.node, Bucket))
rbucketv.extend(_)
if len(rlevel) == 0:
continue
......@@ -369,6 +372,7 @@ def Restructure(ztree, newStructure):
# verify that old keys == new keys
zkeys = set()
keys = set()
print('ZRBUCKETV:', zrbucketv)
for _ in zrbucketv: zkeys.update(_.node.keys())
for _ in rbucketv: keys.update(_.node.keyv)
assert set(kv.keys()) == zkeys, (set(kv.keys()), zkeys)
......
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