Skip to content

Commit

Permalink
Clarify meaning of return value
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Aug 10, 2024
1 parent 031e91e commit e7a65c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/pathlib/_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def copyfileobj(source_f, target_f):
try:
# Use OS copy where available.
for copy_func in _copy_funcs:
if copy_func(source_fd, target_fd):
success = copy_func(source_fd, target_fd)
if success:
return
except OSError as err:
# Produce more useful error messages.
Expand Down

0 comments on commit e7a65c0

Please sign in to comment.