Skip to content

Commit fb71f8b

Browse files
joshmoorejakirkham
andauthored
Use pop rather than del
Co-authored-by: jakirkham <[email protected]>
1 parent ef5b33f commit fb71f8b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

zarr/n5.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,7 @@ 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-
try:
315-
del group_metadata['n5']
316-
except KeyError:
317-
# This only exists at the top level
318-
pass
314+
group_metadata.pop('n5')
319315
group_metadata['zarr_format'] = ZARR_FORMAT
320316
return group_metadata
321317

0 commit comments

Comments
 (0)