From cb2fa7e5dd86949a06dcdb3babdecc778985fd02 Mon Sep 17 00:00:00 2001 From: "yyfeng88625@gmail.com" Date: Fri, 21 Mar 2014 13:43:54 +0800 Subject: Python2.x needs encode as well. --HG-- extra : source : ab82442e2205a4ab1016711e482388590688fa15 --- setuptools/command/egg_info.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 4f5c9694..30873e19 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -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() -- cgit v1.2.1