Martin Panter added the comment:

Also, man pages for Free BSD and OS X (where writing to a disk file is not 
supported) say it raises:

* ENOTSUP if “the ‘fd’ argument does not refer to a regular file”
* EBADF if “the ‘s’ argument is not a valid socket descriptor”
* ENOTSOCK if “the ‘s’ argument is not a socket”
* EOPNOTSUPP if “the file system for descriptor fd does not support sendfile()”

It is not clear what the priority of these errors is, so it might be safest to 
catch them all. But I wouldn’t catch any arbitrary OSError, because you may end 
up doing weird double copying or something for an out-of-space error.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25156>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to