Skip to content

Commit

Permalink
fix local read bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rwegener2 committed Jan 3, 2024
1 parent 15d6081 commit db7dfe5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion icepyx/core/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import earthaccess
import h5py
import numpy as np
from s3fs.core import S3File
import xarray as xr

from icepyx.core.auth import EarthdataAuthMixin
Expand Down Expand Up @@ -826,7 +827,8 @@ def load(self):
all_dss.append(
self._build_single_file_dataset(file, groups_list)
) # wanted_groups, vgrp.keys()))
file.close()
if isinstance(file, S3File):
file.close()

if len(all_dss) == 1:
return all_dss[0]
Expand Down

0 comments on commit db7dfe5

Please sign in to comment.