Skip to content

Commit 224e988

Browse files
authored
asyncfs: don't pass callback to _call_oss (#134)
1 parent aa072fe commit 224e988

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ossfs/async_oss.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ async def _put_file(self, lpath: str, rpath: str, **kwargs):
383383
return
384384
await self._mkdir(lpath)
385385
else:
386-
callback = as_progress_handler(kwargs.get("callback", None))
386+
callback = as_progress_handler(kwargs.pop("callback", None))
387387
if os.path.getsize(lpath) >= SIMPLE_TRANSFER_THRESHOLD:
388388
await self._call_oss(
389389
"resumable_upload",
@@ -411,7 +411,7 @@ async def _get_file(self, rpath: str, lpath: str, **kwargs):
411411
if await self._isdir(rpath):
412412
# don't make local "directory"
413413
return
414-
callback = as_progress_handler(kwargs.get("callback", None))
414+
callback = as_progress_handler(kwargs.pop("callback", None))
415415
if await self._size(rpath) >= SIMPLE_TRANSFER_THRESHOLD:
416416
await self._call_oss(
417417
"resumable_download",

0 commit comments

Comments
 (0)