summaryrefslogtreecommitdiff
path: root/buildscripts/make_vcxproj.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/make_vcxproj.py')
-rw-r--r--buildscripts/make_vcxproj.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/buildscripts/make_vcxproj.py b/buildscripts/make_vcxproj.py
index 6b8fc04730a..6af1007bea5 100644
--- a/buildscripts/make_vcxproj.py
+++ b/buildscripts/make_vcxproj.py
@@ -112,15 +112,15 @@ def _replace_vcxproj(file_name, restore_elements):
stream = io.StringIO()
- tree.write(stream)
+ tree.write(stream, encoding='unicode')
- str_value = stream.getvalue().encode()
+ str_value = stream.getvalue()
# Strip the "ns0:" namespace prefix because ElementTree does not support default namespaces.
str_value = str_value.replace("<ns0:", "<").replace("</ns0:", "</").replace(
"xmlns:ns0", "xmlns")
- with io.open(file_name, mode='wb') as file_handle:
+ with io.open(file_name, mode='w') as file_handle:
file_handle.write(str_value)
@@ -150,7 +150,7 @@ class ProjFileGenerator(object): # pylint: disable=too-many-instance-attributes
return self
def __exit__(self, exc_type, exc_value, traceback):
- self.vcxproj = open(self.vcxproj_file_name, "wb")
+ self.vcxproj = open(self.vcxproj_file_name, "w", )
with open('buildscripts/vcxproj.header', 'r') as header_file:
header_str = header_file.read()
@@ -180,7 +180,7 @@ class ProjFileGenerator(object): # pylint: disable=too-many-instance-attributes
self.vcxproj.write(" <ClCompile Include=\"" + command["file"] + "\" />\n")
self.vcxproj.write(" </ItemGroup>\n")
- self.filters = open(self.target + ".vcxproj.filters", "wb")
+ self.filters = open(self.target + ".vcxproj.filters", "w")
self.filters.write("<?xml version='1.0' encoding='utf-8'?>\n")
self.filters.write("<Project ToolsVersion='14.0' " +
"xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>\n")