From 0515f30739d1dce3bc10921db403f336358ef447 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 3 May 2014 12:58:13 -0400 Subject: Backed out changeset: b0a2fcc5275a Ref #193 --- setuptools/command/egg_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'setuptools/command/egg_info.py') diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 30873e19..4f5c9694 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -304,7 +304,8 @@ def write_file(filename, contents): sequence of strings without line terminators) to it. """ contents = "\n".join(contents) - contents = contents.encode("utf-8") + if sys.version_info >= (3,): + contents = contents.encode("utf-8") f = open(filename, "wb") # always write POSIX-style manifest f.write(contents) f.close() -- cgit v1.2.1