Skip to content

Commit

Permalink
Fix error for reading in WindowsPath objects
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbhr committed Jun 12, 2024
1 parent 1925366 commit 71bd7f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions saenopy/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,11 +1002,12 @@ def load_solver(filename: str) -> Solver:
def load(filename: str) -> Result:
from saenopy.gui.spheroid.modules.result import ResultSpheroid
from saenopy.gui.tfm2d.modules.result import Result2D

if filename.endswith(".saenopySpheroid"):
if str(filename).endswith(".saenopySpheroid"):
return ResultSpheroid.load(filename)
if filename.endswith(".saenopy2D"):
if str(filename).endswith(".saenopy2D"):
return Result2D.load(filename)

return Result.load(filename)


Expand Down

0 comments on commit 71bd7f1

Please sign in to comment.