Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,12 @@ def _fastcopy_sendfile(fsrc, fdst):
err.filename = fsrc.name
err.filename2 = fdst.name

if err.errno == errno.ENOTSOCK:
# sendfile() on this platform (probably Linux < 2.6.33)
# does not support copies between regular files (only
# sockets).
if err.errno in (errno.ENOTSOCK, errno.ENODATA):
# ENOTSOCK: sendfile() on this platform (probably
# Linux < 2.6.33) does not support copies between
# regular files (only sockets).
# ENODATA: In rare cases sendfile() on Linux Lustre call
# returns ENODATA
_USE_CP_SENDFILE = False
raise _GiveupOnFastCopy(err)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:func:`shutil.copyfile`: Detect problem seen on Lustre filesystems
giving "Errno 61" due to the sendfile(2) optimised implementation and
fall back to the Posix standard read/write implementation.
Loading