Skip to content
Snippets Groups Projects
Commit 35c71a42 authored by Sarah Jane Grimm's avatar Sarah Jane Grimm
Browse files

smilei: copy all attrs of groups

parent f214aa02
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,10 @@ def _generateh5indexfile(indexfile, fnames):
# maybe a group and must be linked as well.
if isinstance(hf[key], h5py._hl.dataset.Dataset) or "value" in hf[key].attrs:
ih[key] = h5py.ExternalLink(fname, key)
elif isinstance(hf[key], h5py._hl.group.Group) and key not in ih:
ih.create_group(key)
for attr in hf[key].attrs:
ih[key].attrs[attr] = hf[key].attrs[attr]
with h5py.File(indexfile, 'w') as ih:
for fname in fnames:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment