0
0
mirror of https://github.com/python/cpython.git synced 2024-11-24 00:38:00 +01:00

shutil._copyfileobj_readinto: tiny speedup (#92377)

This commit is contained in:
Lucinda May Phipps 2022-05-20 16:14:05 +01:00 committed by GitHub
parent f20a6a54fb
commit 87b9b4e060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)