Skip to content

Commit

Permalink
Fix keep going
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking13 committed Sep 19, 2023
1 parent 53cebc3 commit 730a834
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions micropip/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ def eval_marker(e: dict[str, str]) -> bool:
raise
except ValueError:
self.failed.append(req)
raise
if not self.keep_going:
raise

def _add_requirement_from_pyodide_lock(self, req: Requirement) -> bool:
"""
Expand All @@ -326,7 +327,7 @@ def _add_requirement_from_pyodide_lock(self, req: Requirement) -> bool:

return False

async def _add_requirement_from_package_index(self, req: Requirement) -> bool:
async def _add_requirement_from_package_index(self, req: Requirement):
"""
Find requirement from package index. If the requirement is found,
add it to the package list and return True. Otherwise, return False.
Expand All @@ -335,23 +336,15 @@ async def _add_requirement_from_package_index(self, req: Requirement) -> bool:
req.name, self.fetch_kwargs, index_urls=self.index_urls
)

try:
wheel = find_wheel(metadata, req)
except ValueError:
if not self.keep_going:
raise
else:
return False
wheel = find_wheel(metadata, req)

# Maybe while we were downloading pypi_json some other branch
# installed the wheel?
satisfied, ver = self.check_version_satisfied(req)
if satisfied:
logger.info(f"Requirement already satisfied: {req} ({ver})")
return True

await self.add_wheel(wheel, req.extras, specifier=str(req.specifier))
return True

async def add_wheel(
self,
Expand Down

0 comments on commit 730a834

Please sign in to comment.