Skip to content

Commit

Permalink
fix: revert for windows compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
gengjiawen committed Aug 16, 2021
1 parent 6a71001 commit d078e7d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pylib/gyp/easy_xml.py
Expand Up @@ -123,10 +123,7 @@ def WriteXmlIfChanged(content, path, encoding="utf-8", pretty=False,

default_encoding = locale.getdefaultlocale()[1]
if default_encoding and default_encoding.upper() != encoding.upper():
if win32 and sys.version_info < (3, 7):
xml_string = xml_string.decode("cp1251").encode(encoding)
else:
xml_string = xml_string.encode(encoding)
xml_string = xml_string.encode(encoding)

# Get the old content
try:
Expand Down

0 comments on commit d078e7d

Please sign in to comment.