Skip to content

Commit

Permalink
asyncfs: don't pass callback to _call_oss (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Aug 22, 2023
1 parent aa072fe commit 224e988
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ossfs/async_oss.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 224e988

Please sign in to comment.