We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9812aec commit f21f1c2Copy full SHA for f21f1c2
src/zarr/storage/_fsspec.py
@@ -2,6 +2,7 @@
2
3
import warnings
4
import inspect
5
+from contextlib import suppress
6
from typing import TYPE_CHECKING, Any
7
8
from zarr.abc.store import ByteRangeRequest, Store
@@ -273,10 +274,8 @@ async def delete_dir(self, prefix: str) -> None:
273
274
path_to_delete = _dereference_path(self.path, prefix)
275
276
if hasattr(self.fs, "_rm") and inspect.iscoroutinefunction(self.fs._rm):
- try:
277
+ with suppress(self.allowed_exceptions):
278
await self.fs._rm(path_to_delete, recursive=True)
- except self.allowed_exceptions:
279
- pass
280
else:
281
raise NotImplementedError("The store does not support async deletes")
282
0 commit comments