Skip to content

Commit

Permalink
fix ftp download typo
Browse files Browse the repository at this point in the history
  • Loading branch information
yodeng committed Sep 15, 2022
1 parent dab3663 commit faa0205
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/src.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async def download_ftp(self):
"Start %s %s", asyncio.current_task().get_name(), 'bytes={0}-{1}'.format(size, self.content_length))
async with client.download_stream(filepath, offset=size) as stream:
# async with path_io.open(self.outfile, mode=size and "ab" or "wb") as f:
chunk_size = self.chunk_size/100
chunk_size = self.chunk_size//100
self.rate_limiter.clamped_calls = max(
1, int(float(self.max_speed)/chunk_size))
self.rate_limiter.refresh()
Expand All @@ -153,7 +153,7 @@ async def download_ftp(self):
if chunk:
# await f.write(block)
self.rate_limiter.wait()
f.write(block)
f.write(chunk)
f.flush()
bar.update(len(chunk))
self.loger.debug(
Expand Down

0 comments on commit faa0205

Please sign in to comment.