From 92b25d78aa5104da22912d9e01489313e9cde5db Mon Sep 17 00:00:00 2001 From: Lukas Trippe Date: Fri, 13 Dec 2024 11:38:28 +0100 Subject: [PATCH] fix: add mindopt license check (#393) --- linopy/solvers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linopy/solvers.py b/linopy/solvers.py index ef13c6a8..efe29500 100644 --- a/linopy/solvers.py +++ b/linopy/solvers.py @@ -103,7 +103,10 @@ with contextlib.suppress(ModuleNotFoundError): import mindoptpy - available_solvers.append("mindopt") + with contextlib.suppress(mindoptpy.MindoptError): + mindoptpy.Env() + + available_solvers.append("mindopt") with contextlib.suppress(ModuleNotFoundError): import coptpy