Merge pull request #5509 from imntjempty/tools-eclipse-bug

tools: fix generate .project file error.
This commit is contained in:
guo 2022-01-13 15:52:02 +08:00 committed by GitHub
commit 230d26714b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -365,7 +365,7 @@ def UpdateProjectStructure(env, prj_name):
out = open('.project', 'w')
out.write('<?xml version="1.0" encoding="UTF-8"?>\n')
xml_indent(root)
out.write(etree.tostring(root, encoding='utf-8'))
out.write(etree.tostring(root, encoding='utf-8').decode('utf-8')
out.close()
return
@ -504,7 +504,7 @@ def UpdateCproject(env, project, excluding, reset, prj_name):
out.write('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n')
out.write('<?fileVersion 4.0.0?>')
xml_indent(root)
out.write(etree.tostring(root, encoding='utf-8'))
out.write(etree.tostring(root, encoding='utf-8').decode('utf-8')
out.close()