File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -206,16 +206,12 @@ def _fastcopy_sendfile(fsrc, fdst):
206
206
err .filename = fsrc .name
207
207
err .filename2 = fdst .name
208
208
209
- if err .errno == errno .ENOTSOCK :
210
- # sendfile() on this platform (probably Linux < 2.6.33)
211
- # does not support copies between regular files (only
212
- # sockets).
213
- _USE_CP_SENDFILE = False
214
- raise _GiveupOnFastCopy (err )
215
-
216
- if err .errno == errno .ENODATA :
217
- # In rare cases sendfile() on Linux Lsture call
218
- # returns ENODATA.
209
+ if err .errno in (errno .ENOTSOCK , errno .ENODATA ):
210
+ # ENOTSOCK: sendfile() on this platform (probably
211
+ # Linux < 2.6.33) does not support copies between
212
+ # regular files (only sockets).
213
+ # ENODATA: In rare cases sendfile() on Linux Lustre call
214
+ # returns ENODATA
219
215
_USE_CP_SENDFILE = False
220
216
raise _GiveupOnFastCopy (err )
221
217
You can’t perform that action at this time.
0 commit comments