Skip to content

Commit 87b9b4e

Browse files
authored
shutil._copyfileobj_readinto: tiny speedup (python#92377)
1 parent f20a6a5 commit 87b9b4e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/shutil.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ def _copyfileobj_readinto(fsrc, fdst, length=COPY_BUFSIZE):
182182
break
183183
elif n < length:
184184
with mv[:n] as smv:
185-
fdst.write(smv)
185+
fdst_write(smv)
186+
break
186187
else:
187188
fdst_write(mv)
188189

0 commit comments

Comments
 (0)