summaryrefslogtreecommitdiff
path: root/setuptools/command
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-05-16 00:28:45 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-05-16 00:28:45 -0400
commit95ebcce3b18c875de727dbfd276681d13ba47850 (patch)
treeddb667a70d723807a36b740b9e85c5a0c6b5df14 /setuptools/command
parentc0588870ebc9f10daa0bdafcf9bd4488aef478ce (diff)
downloadpython-setuptools-bitbucket-95ebcce3b18c875de727dbfd276681d13ba47850.tar.gz
Extract _safe_path
Diffstat (limited to 'setuptools/command')
-rwxr-xr-xsetuptools/command/egg_info.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 00a50d0b..88027dd0 100755
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -209,17 +209,20 @@ class FileList(_FileList):
item = item[:-1]
path = convert_path(item)
+ if self._safe_path(path):
+ self.files.append(path)
+
+ def _safe_path(self, path):
if sys.version_info >= (3,):
try:
if os.path.exists(path) or os.path.exists(path.encode('utf-8')):
- self.files.append(path)
+ return True
except UnicodeEncodeError:
log.warn("'%s' not %s encodable -- skipping", path,
sys.getfilesystemencoding())
else:
if os.path.exists(path):
- self.files.append(path)
-
+ return True
class manifest_maker(sdist):