Skip to content

Commit

Permalink
fix: catch all exceptions, raise import
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Jun 23, 2022
1 parent 836ee84 commit a071416
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
logger = getLogger(__name__)
try:
from ._cython.dsi_helper import fold_cg
except ModuleNotFoundError:
except:
raise ImportError("Cython compiled code not found")


Expand Down
5 changes: 3 additions & 2 deletions LoopStructural/interpolators/piecewiselinear_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
Piecewise linear interpolator
"""
import numpy as np

try:
from LoopStructural.interpolators._cython.dsi_helper import cg, fold_cg
except ModuleNotFoundError:
raise ImportError('Cython compiled code not found')
except:
raise ImportError("Cython compiled code not found")
from LoopStructural.interpolators import DiscreteInterpolator
from LoopStructural.interpolators import InterpolatorType

Expand Down

0 comments on commit a071416

Please sign in to comment.