Skip to content

Commit

Permalink
use startswith to check suffix is nc
Browse files Browse the repository at this point in the history
  • Loading branch information
huard committed Apr 8, 2021
1 parent e7ad17e commit 2e229c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ravenpy/models/importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def __init__(self, fns):

def _extract_nc_attrs(self, fns):
for fn in fns:
if ".nc" in Path(fn).suffix:
if Path(fn).suffix.startswith(".nc"):
with xr.open_dataset(fn) as ds:
# Check if any alternate variable name is in the file.
for var, alt_names in rv.alternate_nc_names.items():
Expand Down

0 comments on commit 2e229c3

Please sign in to comment.