From 1391ebdabc19e2e22c43453d9edd4441ac16c792 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Thu, 30 Nov 2023 20:52:57 -0800 Subject: [PATCH] checkpoint --- src/hdmf_zarr/backend.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/hdmf_zarr/backend.py b/src/hdmf_zarr/backend.py index 1fcf149b..97207a87 100644 --- a/src/hdmf_zarr/backend.py +++ b/src/hdmf_zarr/backend.py @@ -468,13 +468,16 @@ def __open_file_consolidated(self, synchronizer = None, storage_options = None): """ - This method will check to see if the metadata has been consolidated, if so + This method will check to see if the metadata has been consolidated. + If so, use open_consolidated. """ - try: - temp = os.path.isfile(self.path+'/.zmetadata') - except TypeError: - temp = os.path.isfile(self.path.path+'/.zmetadata') - if temp: + # self.path can be both a string or a one of the `SUPPORTED_ZARR_STORES`. + if isinstance(self.path, str): + path = self.path + else: + path = self.path.path + + if os.path.isfile(path+'/.zmetadata'): return zarr.open_consolidated(store=store, mode=mode, synchronizer=synchronizer,