From b01bb7ca4a777420c85c4d5675f7aa41f29749a2 Mon Sep 17 00:00:00 2001 From: lkstrp Date: Fri, 13 Dec 2024 09:57:55 +0100 Subject: [PATCH] fix: add mindopt license check --- 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