summaryrefslogtreecommitdiff
path: root/tools/gyp/pylib/gyp/easy_xml.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gyp/pylib/gyp/easy_xml.py')
-rw-r--r--tools/gyp/pylib/gyp/easy_xml.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gyp/pylib/gyp/easy_xml.py b/tools/gyp/pylib/gyp/easy_xml.py
index acccb47b75..86d0ba6c0c 100644
--- a/tools/gyp/pylib/gyp/easy_xml.py
+++ b/tools/gyp/pylib/gyp/easy_xml.py
@@ -120,7 +120,7 @@ def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False,
default_encoding = locale.getdefaultlocale()[1]
if default_encoding and default_encoding.upper() != encoding.upper():
- xml_string = xml_string.decode(default_encoding).encode(encoding)
+ xml_string = xml_string.encode(encoding)
# Get the old content
try:
@@ -132,7 +132,7 @@ def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False,
# It has changed, write it
if existing != xml_string:
- f = open(path, 'w')
+ f = open(path, 'wb')
f.write(xml_string)
f.close()