提交 66823a25 编写于 作者: L Lukáš Doktor

avocado.core.tree: Return self as root when no parents

self is a valid node and can be root of the tree.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 9f86f6cb
......@@ -127,7 +127,7 @@ class TreeNode(object):
def get_root(self):
""" Get root of this tree """
root = None
root = self
for root in self.iter_parents():
pass
return root
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册