From 77c836b87c7fb79889b548a7791cf02d7e8bad7a Mon Sep 17 00:00:00 2001 From: keli Date: Thu, 26 Jun 2025 00:53:14 +0800 Subject: [PATCH] Added support for retrying in `Client.open()` --- src/webdav4/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webdav4/client.py b/src/webdav4/client.py index bb430cd..0bec36d 100644 --- a/src/webdav4/client.py +++ b/src/webdav4/client.py @@ -578,11 +578,13 @@ def open( raise IsACollectionError(path, "Cannot open a collection") assert mode in {"r", "rt", "rb"} - with IterStream( + call = wrap_fn(IterStream, self, self.join_url(path), chunk_size=chunk_size or self.chunk_size, - ) as buffer: + ) + + with self.with_retry(call) as buffer: buff = cast(BinaryIO, buffer) if mode == "rb":