fix xmllint_format by encoding as utf-8 and keeping fingers crossed that it will work in 27 34 and 36
@@ -75,10 +75,10 @@ def xmllint_format(xml):
from lxml import etree as ET
parser = ET.XMLParser(resolve_entities=False, strip_cdata=False, remove_blank_text=True)
document = ET.fromstring(xml, parser)
- return '%s\n%s' % (
+ return ('%s\n%s' % (
'<?xml version="1.0" encoding="UTF-8"?>',
ET.tostring(document, pretty_print=True)
- )
+ )).encode('utf-8')
def is_string(val):
# pylint: disable=undefined-variable
