Fix the Python 3 support of pretty_xml
This commit is contained in:
parent
0a84905383
commit
5ea41e5f4b
@ -86,8 +86,9 @@ def _pretty_xml(element, level=0):
|
||||
if level and (not element.tail or not element.tail.strip()):
|
||||
element.tail = i
|
||||
if not level:
|
||||
return '<?xml version="1.0"?>\n' + ET.tostring(
|
||||
element, config.get("encoding", "request"))
|
||||
output_encoding = config.get("encoding", "request")
|
||||
return ('<?xml version="1.0"?>\n' + ET.tostring(
|
||||
element, "utf-8").decode("utf-8")).encode(output_encoding)
|
||||
|
||||
|
||||
def _tag(short_name, local):
|
||||
|
Loading…
Reference in New Issue
Block a user