From 7ccc0a522d9e82ab02b22897ea24c70066303fc9 Mon Sep 17 00:00:00 2001 From: ghislainp Date: Tue, 26 Mar 2024 02:09:16 +0100 Subject: [PATCH] _bulk_delete must always return a list, even when pathlist is empty (#866) --- s3fs/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3fs/core.py b/s3fs/core.py index d6eb4e45..2da6f0bd 100644 --- a/s3fs/core.py +++ b/s3fs/core.py @@ -1954,7 +1954,7 @@ async def _bulk_delete(self, pathlist, **kwargs): Must have 0 < len <= 1000 """ if not pathlist: - return + return [] buckets = {self.split_path(path)[0] for path in pathlist} if len(buckets) > 1: raise ValueError("Bulk delete files should refer to only one bucket")