fix: 修复windows系统下编码格式导致的无法生成文件异常
This commit is contained in:
parent
9188d7d7b1
commit
14fdb7eba8
|
@ -46,7 +46,7 @@ class Make:
|
|||
else:
|
||||
value = doc.createTextNode(str(self.data[key]))
|
||||
key_node.appendChild(value)
|
||||
f = open(file=self.xml_path, mode="w")
|
||||
f = open(file=self.xml_path, mode="w", encoding='UTF8')
|
||||
python_version = sys.version_info.minor
|
||||
if 8 == python_version:
|
||||
doc.writexml(writer=f, addindent=" ", newl="\n", encoding="utf-8")
|
||||
|
|
Loading…
Reference in New Issue
Block a user