Treelib fix

This commit is contained in:
Pavel 'LEdoian' Turinsky 2020-03-18 23:18:32 +01:00
parent 91c2490d01
commit 2888975eab

View file

@ -19,6 +19,8 @@ def safe_pred(node):
return None return None
def first_brother(node): def first_brother(node):
if node is None:
return None
brother = node brother = node
while safe_pred(brother) is not None: while safe_pred(brother) is not None:
brother = safe_pred(brother) brother = safe_pred(brother)