Skip to content

Commit

Permalink
Python3.9 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed May 2, 2024
1 parent 483dbea commit d35f23f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ravenpy/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def nc_specs(
if isinstance(fn, str) and str(fn)[:4] == "http":
pass
elif os.path.exists(fn):
fn = os.path.realpath(fn, strict=True)
# `strict` kwarg is not available in Python 3.9
try:
fn = os.path.realpath(fn, strict=True)
except TypeError:
fn = os.path.realpath(fn)
else:
raise ValueError("NetCDF file not found.")

Expand Down

0 comments on commit d35f23f

Please sign in to comment.