Skip to content

Commit

Permalink
fix: calls to deprecated conda api
Browse files Browse the repository at this point in the history
  • Loading branch information
alubbock committed Aug 16, 2024
1 parent 4d1b2b9 commit 0649cfa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions microbench/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
psutil = None
try:
import conda
import conda.cli.python_api
import conda.testing.conda_cli
except ImportError:
conda = None
try:
Expand Down Expand Up @@ -274,9 +274,9 @@ def capture_conda_packages(self, bm_data):
# Use subprocess
pkg_list = subprocess.check_output(['conda', 'list']).decode('utf8')
else:
# Use conda Python API
pkg_list, stderr, ret_code = conda.cli.python_api.run_command(
conda.cli.python_api.Commands.LIST)
# Use conda API
pkg_list, stderr, ret_code = conda.testing.conda_cli.run_command(
conda.testing.conda_cli.Commands.LIST)

if ret_code != 0 or stderr:
raise RuntimeError('Error running conda list: {}'.format(
Expand Down

0 comments on commit 0649cfa

Please sign in to comment.