summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):