Skip to content

Commit 92b25d7

Browse files
authored
fix: add mindopt license check (#393)
1 parent ede48e3 commit 92b25d7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

linopy/solvers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@
103103
with contextlib.suppress(ModuleNotFoundError):
104104
import mindoptpy
105105

106-
available_solvers.append("mindopt")
106+
with contextlib.suppress(mindoptpy.MindoptError):
107+
mindoptpy.Env()
108+
109+
available_solvers.append("mindopt")
107110

108111
with contextlib.suppress(ModuleNotFoundError):
109112
import coptpy

0 commit comments

Comments
 (0)