Skip to content

Commit 5b51340

Browse files
Handle ImportError in xpress import (#509)
* Handle ImportError in xpress import Also catch ImportError for xpress import. This should resolve rarely occuring compat problem with numpy packages * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 20c9665 commit 5b51340

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

linopy/solvers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103

104104
available_solvers.append("cplex")
105105

106-
with contextlib.suppress(ModuleNotFoundError):
106+
with contextlib.suppress(ModuleNotFoundError, ImportError):
107107
import xpress
108108

109109
available_solvers.append("xpress")

0 commit comments

Comments
 (0)