From fa8434d59a15b99cc2f92b5bf5d42f2e00709e73 Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Sun, 9 Jul 2023 01:34:20 +0200 Subject: [PATCH] Use extract_json_object instead of replace Co-authored-by: Riccardo Porreca --- conda_lock/conda_solver.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/conda_lock/conda_solver.py b/conda_lock/conda_solver.py index 89d92642..402bb143 100644 --- a/conda_lock/conda_solver.py +++ b/conda_lock/conda_solver.py @@ -492,14 +492,7 @@ def update_specs_for_arch( f"Could not lock the environment for platform {platform}: {err_json.get('message')}" ) from exc - conda_update_output = proc.stdout - - # - conda_update_output = conda_update_output.replace( - "No package record found!", "" - ) - - dryrun_install: DryRunInstall = json.loads(conda_update_output) + dryrun_install: DryRunInstall = json.loads(extract_json_object(proc.stdout)) else: dryrun_install = {"actions": {"LINK": [], "FETCH": []}}