Commit b08a456d authored by Yoshitaka Aharen's avatar Yoshitaka Aharen
Browse files

[2157] specify encoding explicitly for xml.etree.ElementTree.tostring

parent f9b16524
......@@ -167,7 +167,8 @@ def generate_docfile(docfile, def_mtime):
if need_generate(builddir+os.sep+docfile, def_mtime):
doc_pre = open(srcdir+os.sep+docfile+pre_suffix, 'r')
doc_pre_xml = doc_pre.read().replace('@@LOCAL'+'STATEDIR@@', localstatedir)
doc_pre_xml = doc_pre.read().replace('@@LOCAL'+'STATEDIR@@',
localstatedir)
doc_pre.close
variable_tree = ElementTree.Element('variablelist')
......@@ -175,7 +176,7 @@ def generate_docfile(docfile, def_mtime):
doc = open(builddir+os.sep+docfile, 'w')
doc.write(doc_pre_xml.replace(
'<!-- ### STATISTICS DATA PLACEHOLDER ### -->',
ElementTree.tostring(variable_tree)))
str(ElementTree.tostring(variable_tree))))
doc.close()
else:
print('skip generating ' + docfile)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment