Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
d2172906
Commit
d2172906
authored
May 26, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8233e180
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
wcfs/testprog/treegen.py
wcfs/testprog/treegen.py
+3
-2
No files found.
wcfs/testprog/treegen.py
View file @
d2172906
...
...
@@ -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
]
=
LOB
Tree
()
ztree
=
trees
[
treetxt
]
=
XLO
Tree
()
# 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment