Skip to content

Commit

Permalink
shutil._copyfileobj_readinto: tiny speedup (python#92377)
Browse files Browse the repository at this point in the history
  • Loading branch information
landfillbaby authored May 20, 2022
1 parent f20a6a5 commit 87b9b4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def _copyfileobj_readinto(fsrc, fdst, length=COPY_BUFSIZE):
break
elif n < length:
with mv[:n] as smv:
fdst.write(smv)
fdst_write(smv)
break
else:
fdst_write(mv)

Expand Down

0 comments on commit 87b9b4e

Please sign in to comment.