Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise ImportError before trying to unpack solvers #768

Merged
merged 1 commit into from
Dec 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fipy/solvers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ def _import_mesh_matrices(suite):
except Exception as inst:
_exceptions["pyamgx"] = inst

# don't unpack until here in order to keep code above more succinct
_RowMeshMatrix, _ColMeshMatrix, _MeshMatrix = _mesh_matrices

if solver is None:
if _desired_solver is None:
raise ImportError('Unable to load a solver: %s' % str(_exceptions))
Expand All @@ -157,6 +154,9 @@ def _import_mesh_matrices(suite):
else:
raise ImportError('Unknown solver package %s' % _desired_solver)

# don't unpack until here in order to keep code above more succinct
_RowMeshMatrix, _ColMeshMatrix, _MeshMatrix = _mesh_matrices

from fipy.tests.doctestPlus import register_skipper

register_skipper(flag='PYSPARSE_SOLVER',
Expand Down