diff options
| author | Stefan H. Holek <stefan@epy.co.at> | 2012-11-01 11:47:24 +0100 |
|---|---|---|
| committer | Stefan H. Holek <stefan@epy.co.at> | 2012-11-01 11:47:24 +0100 |
| commit | 65aacf409c8c4bce8aa0f029ccec5b2df4596938 (patch) | |
| tree | 363b2f8e4a8aaea1261ff4373be4b1f5d062f1f7 /setuptools/command | |
| parent | 8c13c59de059f2fbd0b106dc908b0488a6ab46f5 (diff) | |
| download | python-setuptools-bitbucket-65aacf409c8c4bce8aa0f029ccec5b2df4596938.tar.gz | |
Skip undecodable filenames in read_manifest as well.
Diffstat (limited to 'setuptools/command')
| -rwxr-xr-x | setuptools/command/sdist.py | 7 |
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: |
