summaryrefslogtreecommitdiff
path: root/setuptools/command/egg_info.py
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
commitfb2038bb99b46b8ec92ad046b79d21c182e718a4 (patch)
tree7c7403b9145499002a25c1079c7270310c562d25 /setuptools/command/egg_info.py
parent592c525ea6ae94f6d5434e25f6db1bb8f8ff73c5 (diff)
downloadpython-setuptools-git-fb2038bb99b46b8ec92ad046b79d21c182e718a4.tar.gz
Extract _safe_path
Diffstat (limited to 'setuptools/command/egg_info.py')
-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):