Skip to content

Commit

Permalink
Add missing if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
maresb committed Feb 26, 2023
1 parent ef28d7f commit 8e62e61
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions conda_lock/conda_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,10 @@ def _get_repodata_record(
for retry in range(1, NUM_RETRIES + 1):
for pkgs_dir in pkgs_dirs:
record = pkgs_dir / dist_name / "info" / "repodata_record.json"
with open(record) as f:
repodata: FetchAction = json.load(f)
return repodata
if record.exists():
with open(record) as f:
repodata: FetchAction = json.load(f)
return repodata
logger.warn(
f"Failed to find repodata_record.json for {dist_name}. "
f"Retrying in 0.1 seconds ({retry}/{NUM_RETRIES})"
Expand Down

0 comments on commit 8e62e61

Please sign in to comment.