Skip to content

Commit e61d6ae

Browse files
authored
Drop decode from ConsolidatedMetadataStore (#452)
This call to `decode` has been made unnecessary thanks to the `json_loads` utility function used here. Unfortunately this code was left over when that was added in. Drop this now unneeded code so as to better handle `bytes`-like data.
1 parent 7431e47 commit e61d6ae

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

zarr/storage.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2451,11 +2451,7 @@ def __init__(self, store, metadata_key='.zmetadata'):
24512451
self.store = store
24522452

24532453
# retrieve consolidated metadata
2454-
if sys.version_info.major == 3 and sys.version_info.minor < 6:
2455-
d = store[metadata_key].decode() # pragma: no cover
2456-
else: # pragma: no cover
2457-
d = store[metadata_key]
2458-
meta = json_loads(d)
2454+
meta = json_loads(store[metadata_key])
24592455

24602456
# check format of consolidated metadata
24612457
consolidated_format = meta.get('zarr_consolidated_format', None)

0 commit comments

Comments
 (0)