Skip to content

Commit fa768ae

Browse files
committed
Close file objects.
1 parent 80e0701 commit fa768ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kerchunk/hdf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ def __init__(
133133
self.unsupported_inline_threshold = unsupported_inline_threshold
134134
lggr.debug(f"HDF5 file URI: {self._uri}")
135135

136+
def close(self):
137+
self._h5f.close()
138+
self.input_file.close()
139+
136140
def translate(self, preserve_linked_dsets=False):
137141
"""Translate content of one HDF5 file into Zarr storage format.
138142

0 commit comments

Comments
 (0)