aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/sdist.py
diff options
context:
space:
mode:
authorStefan H. Holek <stefan@epy.co.at>2012-10-26 12:46:41 +0200
committerStefan H. Holek <stefan@epy.co.at>2012-10-26 12:46:41 +0200
commite485c19015d4fced68b25c09ca66a1743d3ab27c (patch)
tree1191fc24861c35b32cfbc8fecf896a5a5ee06734 /setuptools/command/sdist.py
parentf8481f4b522f0fbeafbb36a20dd105497f2623ac (diff)
downloadexternal_python_setuptools-e485c19015d4fced68b25c09ca66a1743d3ab27c.tar.gz
external_python_setuptools-e485c19015d4fced68b25c09ca66a1743d3ab27c.tar.bz2
external_python_setuptools-e485c19015d4fced68b25c09ca66a1743d3ab27c.zip
Keep 'surrogateescape' when reading the manifest, to avoid breaking on bad input.
--HG-- branch : distribute extra : rebase_source : 6f894cd508e73fae0ad02860654df5181055ba4d
Diffstat (limited to 'setuptools/command/sdist.py')
-rwxr-xr-xsetuptools/command/sdist.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py
index d5259c2b..79eed214 100755
--- a/setuptools/command/sdist.py
+++ b/setuptools/command/sdist.py
@@ -283,7 +283,8 @@ class sdist(_sdist):
manifest = open(self.manifest, 'rbU')
for line in manifest:
if sys.version_info >= (3,):
- line = line.decode('UTF-8')
+ # Don't break if surrogates have crept into the manifest
+ line = line.decode('UTF-8', 'surrogateescape')
# ignore comments and blank lines
line = line.strip()
if line.startswith('#') or not line: