Antoine Pitrou added the comment:

> Why didn't you include ENODEV?
> Apparently it can be reported in some corner cases, e.g. in this patch:
> http://lfs-matrix.net/patches/downloads/linux/linux-2.6.14.2-pseudo_random-1.patch

That isn't mentioned in the POSIX open() spec:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html

However ENODEV still seems to be a standard errno constant, so why not:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html

> Otherwise, wouldn't self.addCleanup be simpler than the large
> try/finally block in the test (but it's not available on 2.7)?

The problem is if some code tries to create a fd before the cleanup
callback is called. With a try/finally block we're guaranteed not to
have such a problem.

----------

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

Reply via email to