aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/egg_info.py
diff options
context:
space:
mode:
authorStefan H. Holek <stefan@epy.co.at>2012-10-17 10:54:39 +0200
committerStefan H. Holek <stefan@epy.co.at>2012-10-17 10:54:39 +0200
commit9d66fb61d9579516c5333d51eb85dc3495e6032f (patch)
tree2aa5f1a07c2149eb791d62e41077eaa470336751 /setuptools/command/egg_info.py
parentb68c62e1cd28a9bedf6c6b8f65c5428361e644a9 (diff)
downloadexternal_python_setuptools-9d66fb61d9579516c5333d51eb85dc3495e6032f.tar.gz
external_python_setuptools-9d66fb61d9579516c5333d51eb85dc3495e6032f.tar.bz2
external_python_setuptools-9d66fb61d9579516c5333d51eb85dc3495e6032f.zip
Use surrogateescape error handler when reading and writing the manifest. Refs #303.
--HG-- branch : distribute extra : rebase_source : f0231cf87e2478f988f798dfe579f28e7561aeff
Diffstat (limited to 'setuptools/command/egg_info.py')
-rwxr-xr-xsetuptools/command/egg_info.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index e1aaa491..9955c8ef 100755
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -360,7 +360,7 @@ def write_file (filename, contents):
"""
contents = "\n".join(contents)
if sys.version_info >= (3,):
- contents = contents.encode("utf-8")
+ contents = contents.encode("utf-8", "surrogateescape")
f = open(filename, "wb") # always write POSIX-style manifest
f.write(contents)
f.close()