From 1aa83ac4a2dab54b84f7887df06550afca91e2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Tue, 22 Aug 2023 10:39:56 +0545 Subject: [PATCH] asyncfs: don't pass callback to _call_oss --- src/ossfs/async_oss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ossfs/async_oss.py b/src/ossfs/async_oss.py index ece02b1..8a07b5e 100644 --- a/src/ossfs/async_oss.py +++ b/src/ossfs/async_oss.py @@ -383,7 +383,7 @@ async def _put_file(self, lpath: str, rpath: str, **kwargs): return await self._mkdir(lpath) else: - callback = as_progress_handler(kwargs.get("callback", None)) + callback = as_progress_handler(kwargs.pop("callback", None)) if os.path.getsize(lpath) >= SIMPLE_TRANSFER_THRESHOLD: await self._call_oss( "resumable_upload", @@ -411,7 +411,7 @@ async def _get_file(self, rpath: str, lpath: str, **kwargs): if await self._isdir(rpath): # don't make local "directory" return - callback = as_progress_handler(kwargs.get("callback", None)) + callback = as_progress_handler(kwargs.pop("callback", None)) if await self._size(rpath) >= SIMPLE_TRANSFER_THRESHOLD: await self._call_oss( "resumable_download",