Skip to content

Commit

Permalink
Fix finalize on Windows (#3)
Browse files Browse the repository at this point in the history
* Swallow unlink error on Windows

* Test on Windows
  • Loading branch information
mdpiper authored Nov 11, 2024
1 parent b4cb534 commit dae53b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
Expand Down
5 changes: 4 additions & 1 deletion gridmet_bmi/bmi_gridmet.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def finalize(self) -> None:
printing reports.
"""
self._day = 0
self._model.clear_cache()
try:
self._model.clear_cache()
except PermissionError as error:
print(error)

def get_component_name(self) -> str:
"""Name of the component.
Expand Down

0 comments on commit dae53b6

Please sign in to comment.