Skip to content
Snippets Groups Projects
Commit 7f85b5e3 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

STY: autopep8'd

parent 97906568
Branches
Tags
2 merge requests!181Release 0.9.0,!174XML Converter
Pipeline #54526 passed with warnings
This commit is part of merge request !181. Comments created here will be created in the context of that merge request.
...@@ -93,7 +93,7 @@ class XMLTagConverter(Converter): ...@@ -93,7 +93,7 @@ class XMLTagConverter(Converter):
tags_as_children: true # _true_ / false tags_as_children: true # _true_ / false
The default is to generate the tags matched by the xpath expression only. The default is to generate the tags matched by the xpath expression only.
- When text_as_children is set to true, text nodes will be generated that contain the text - When text_as_children is set to true, text nodes will be generated that contain the text
contained in the matched tags. contained in the matched tags.
- When attribs_as_children is set to true, attribute nodes will be generated from the attributes - When attribs_as_children is set to true, attribute nodes will be generated from the attributes
...@@ -129,7 +129,8 @@ class XMLTagConverter(Converter): ...@@ -129,7 +129,8 @@ class XMLTagConverter(Converter):
el_lst = [] el_lst = []
for el in children: for el in children:
if isinstance(el, str): if isinstance(el, str):
raise RuntimeError("Only standard xml nodes are supported as results of xpath queries.") raise RuntimeError(
"Only standard xml nodes are supported as results of xpath queries.")
elif isinstance(el, lxml.etree._Element): elif isinstance(el, lxml.etree._Element):
if self.definition.get("tags_as_children", True): if self.definition.get("tags_as_children", True):
el_lst.append(XMLTagElement(el)) el_lst.append(XMLTagElement(el))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment