Antoine Pitrou <pitrou at free.fr> added the comment: I think EBADF is defined everywhere, so you can drop the defined() conditional. _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue4991> _______________________________________