Fix bug in iter_parents

Previously an empty string could be yielded for e.g. `"|cube"` splitting to `["", "cube"]`
This commit is contained in:
Roy Nieterau 2022-04-26 09:43:16 +02:00
parent 66f8ebbd0f
commit 338bb1560a

View file

@ -1876,7 +1876,7 @@ def iter_parents(node):
"""
while True:
split = node.rsplit("|", 1)
if len(split) == 1:
if len(split) == 1 or not split[0]:
return
node = split[0]