提交 97a7e46c 编写于 作者: L Lukáš Doktor

avocado.plugins.yaml_to_mux: Use custom classes in tree creation

The `_create_from_yaml` function allows specifying custom tree node
object, but it only works properly with `tree.TreeNode` inherited ones.
Let's use the custom class instead to make the code cope with different
use cases.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 fd5905d5
......@@ -66,7 +66,7 @@ def _create_from_yaml(path, cls_node=tree.TreeNode):
node = cls_node(str(name))
using = ''
for value in values:
if isinstance(value, tree.TreeNode):
if isinstance(value, cls_node):
node.add_child(value)
elif isinstance(value[0], tree.Control):
if value[0].code == YAML_INCLUDE:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册