Skip to content

Commit

Permalink
Update conda_libmamba_solver/solver.py
Browse files Browse the repository at this point in the history
Co-authored-by: Jannis Leidel <jannis@leidel.info>
  • Loading branch information
jaimergp and jezdez authored Sep 28, 2023
1 parent 9e94ec9 commit bd4c42b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions conda_libmamba_solver/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1011,13 +1011,13 @@ def _notify_conda_outdated(
conda_meta_prefix_directory = os.path.join(context.conda_prefix, "conda-meta")
with suppress(OSError):
if os.path.lexists(conda_meta_prefix_directory):
for filename in os.scandir(conda_meta_prefix_directory):
for entry in os.scandir(conda_meta_prefix_directory):
if (
filename.name.endswith(".json")
and filename.name.rsplit("-", 2)[0] == "conda"
entry.is_file()
and entry.name.endswith(".json")
and entry.name.rsplit("-", 2)[0] == "conda"
):
with open(filename.path) as f:
current_conda_prefix_rec = PrefixRecord(**json.load(f))
current_conda_prefix_rec = PrefixRecord(**json.loads(entry_file.read()))
break
if not current_conda_prefix_rec:
# We are checking whether conda can be found in the environment conda is
Expand Down

0 comments on commit bd4c42b

Please sign in to comment.