aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/sdist.py
diff options
context:
space:
mode:
authorStefan H. Holek <stefan@epy.co.at>2012-11-01 11:47:24 +0100
committerStefan H. Holek <stefan@epy.co.at>2012-11-01 11:47:24 +0100
commitf266bc3745169122fcfcacb781e7e3c70fc58bfb (patch)
treef5c1f94bea7a5fb9edbca9ea8667d0f5b919b6c5 /setuptools/command/sdist.py
parente485c19015d4fced68b25c09ca66a1743d3ab27c (diff)
downloadexternal_python_setuptools-f266bc3745169122fcfcacb781e7e3c70fc58bfb.tar.gz
external_python_setuptools-f266bc3745169122fcfcacb781e7e3c70fc58bfb.tar.bz2
external_python_setuptools-f266bc3745169122fcfcacb781e7e3c70fc58bfb.zip
Skip undecodable filenames in read_manifest as well.
--HG-- branch : distribute extra : rebase_source : 2dda494b1a4758e84dde81cc61170acd0e55d2f2
Diffstat (limited to 'setuptools/command/sdist.py')
-rwxr-xr-xsetuptools/command/sdist.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py
index 79eed214..7a6d2b7d 100755
--- a/setuptools/command/sdist.py
+++ b/setuptools/command/sdist.py
@@ -283,8 +283,11 @@ class sdist(_sdist):
manifest = open(self.manifest, 'rbU')
for line in manifest:
if sys.version_info >= (3,):
- # Don't break if surrogates have crept into the manifest
- line = line.decode('UTF-8', 'surrogateescape')
+ try:
+ line = line.decode('UTF-8')
+ except UnicodeDecodeError:
+ log.warn("%r not UTF-8 decodable -- skipping" % line)
+ continue
# ignore comments and blank lines
line = line.strip()
if line.startswith('#') or not line: