Skip to content

Commit d901734

Browse files
committed
fix RemoteStore.empty
1 parent 3b787a4 commit d901734

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/zarr/storage/remote.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ async def clear(self) -> None:
9696
async def empty(self) -> bool:
9797
# TODO: it would be nice if we didn't have to list all keys here
9898
# it should be possible to stop after the first key is discovered
99-
return not await self.fs._ls(self.path)
99+
try:
100+
return not await self.fs._ls(self.path)
101+
except FileNotFoundError:
102+
return True
100103

101104
def with_mode(self, mode: AccessModeLiteral) -> Self:
102105
return type(self)(

0 commit comments

Comments
 (0)