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",