Skip to content

Commit 3272ba4

Browse files
committed
Re-add error handling
1 parent fb71f8b commit 3272ba4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

zarr/n5.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,11 @@ def group_metadata_to_n5(group_metadata):
311311

312312
def group_metadata_to_zarr(group_metadata):
313313
'''Convert group metadata from N5 to zarr format.'''
314-
group_metadata.pop('n5')
314+
try:
315+
group_metadata.pop('n5')
316+
except KeyError:
317+
# This only exists at the top level
318+
pass
315319
group_metadata['zarr_format'] = ZARR_FORMAT
316320
return group_metadata
317321

0 commit comments

Comments
 (0)