Commit 652247e6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3ebb53cc
......@@ -237,7 +237,11 @@ def TopoDecode(text):
typ = Bucket
else:
raise TopoDecodeError("incorrect node %s: unknown prefix" % qq(tnode))
tkeyv = tnode[1:].split(',') # e.g. 7 8 9
tkeys = tnode[1:] # e.g. '7,8,9' or ''
if tkeys == '':
keyv = []
else:
tkeyv = tkeys.split(',') # e.g. 7 8 9
keyv = [int(_) for _ in tkeyv]
if typ is Bucket:
node = Bucket(*keyv)
......@@ -258,7 +262,7 @@ def TopoDecode(text):
raise TopoDecodeError("level %d does not link to all nodes in the next level" %
len(levelv+1))
if len(currentv) != 0:
if len(currentv) != 1:
raise TopoDecodeError("first level has %d entries; must be 1" % len(currentv))
root = currentv[0]
......
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