Skip to content

Commit ddd6ff7

Browse files
committed
Merge branch 'mr/cardao/fix-fetch_candidate' into 'master'
Fix e3.python.pypi.PyPI.fetch_candidates See merge request it/e3-core!139
2 parents c8898a6 + a1f8d83 commit ddd6ff7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/e3/python/pypi.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,13 @@ def fetch_candidates(
276276
"""
277277
if identifier not in self.candidate_cache:
278278
self.candidate_cache[identifier] = []
279-
project_links = self.fetch_project_links(identifier.split("@", 1)[0])
279+
# When we are trying to fetch a PyPI candidate, we can just ignore errors.
280+
# Indeed the goal of the current function is to create a list of candidate.
281+
# A package that causes an Exception during parsing should not be
282+
# considered as a valid candidate.
283+
project_links = self.fetch_project_links(
284+
identifier.split("@", 1)[0], ignore_errors=True
285+
)
280286
for link in project_links:
281287
try:
282288
c = PyPICandidate(

0 commit comments

Comments
 (0)