Commit cb2fa7e5 authored by yyfeng88625@gmail.com's avatar yyfeng88625@gmail.com

Python2.x needs encode as well.

--HG--
extra : source : ab82442e2205a4ab1016711e482388590688fa15
parent 6c6fcae2
......@@ -304,8 +304,7 @@ def write_file(filename, contents):
sequence of strings without line terminators) to it.
"""
contents = "\n".join(contents)
if sys.version_info >= (3,):
contents = contents.encode("utf-8")
contents = contents.encode("utf-8")
f = open(filename, "wb") # always write POSIX-style manifest
f.write(contents)
f.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment