diff options
| author | Stefan H. Holek <stefan@epy.co.at> | 2012-10-26 12:46:41 +0200 |
|---|---|---|
| committer | Stefan H. Holek <stefan@epy.co.at> | 2012-10-26 12:46:41 +0200 |
| commit | 8c13c59de059f2fbd0b106dc908b0488a6ab46f5 (patch) | |
| tree | 8af613b603f2f918e8e14eb02e8ca43fd080807e /setuptools/command/sdist.py | |
| parent | dc98c028de52c7bc21734c7965989fb41919ce34 (diff) | |
| download | python-setuptools-bitbucket-8c13c59de059f2fbd0b106dc908b0488a6ab46f5.tar.gz | |
Keep 'surrogateescape' when reading the manifest, to avoid breaking on bad input.
Diffstat (limited to 'setuptools/command/sdist.py')
| -rwxr-xr-x | setuptools/command/sdist.py | 3 |
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: |
