From f4f9a02e7457ef1be2204bbd75e37f03d300b4b8 Mon Sep 17 00:00:00 2001 From: Jeremy Magland Date: Fri, 19 Apr 2024 10:13:57 -0500 Subject: [PATCH] test_staging_area --- lindi/LindiH5pyFile/LindiH5pyFile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lindi/LindiH5pyFile/LindiH5pyFile.py b/lindi/LindiH5pyFile/LindiH5pyFile.py index 9682806..e8f9a50 100644 --- a/lindi/LindiH5pyFile/LindiH5pyFile.py +++ b/lindi/LindiH5pyFile/LindiH5pyFile.py @@ -140,9 +140,12 @@ def to_reference_file_system(self): """ if self._zarr_store is None: raise Exception("Cannot convert to reference file system without zarr store") - if not isinstance(self._zarr_store, LindiReferenceFileSystemStore): + zarr_store = self._zarr_store + if isinstance(zarr_store, LindiStagingStore): + zarr_store = zarr_store._base_store + if not isinstance(zarr_store, LindiReferenceFileSystemStore): raise Exception(f"Unexpected type for zarr store: {type(self._zarr_store)}") - rfs = self._zarr_store.rfs + rfs = zarr_store.rfs rfs_copy = json.loads(json.dumps(rfs)) LindiReferenceFileSystemStore.replace_meta_file_contents_with_dicts(rfs_copy) return rfs_copy