From ed777ef874a6852227181ce944bad1672b742147 Mon Sep 17 00:00:00 2001 From: Alex Merose Date: Sat, 27 Aug 2022 19:09:21 -0700 Subject: [PATCH] For `_rm`, now raising multiple exceptions instead of the first. I'm following this example to raise multiple exceptions, with the intention that this will help me better debug a GCS error: https://stackoverflow.com/a/50414672. --- gcsfs/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcsfs/core.py b/gcsfs/core.py index cccc8828..b9f21f42 100644 --- a/gcsfs/core.py +++ b/gcsfs/core.py @@ -984,7 +984,7 @@ async def _rm(self, path, recursive=False, maxdepth=None, batchsize=20): and not isinstance(ex, FileNotFoundError) ] if exs: - raise exs[0] + raise Exception(exs) await asyncio.gather(*[self._rmdir(d) for d in dirs]) rm = sync_wrapper(_rm)