[issue25138] test_socket: socket.EAI_NODATA doesn't exist on FreeBSD

Martin Panter report at bugs.python.org
Sat Sep 19 09:01:20 CEST 2015


Martin Panter added the comment:

Maybe it is good enough use something like this as a workaround, with an appropriate comment:

if e.errno == getattr(socket, "EAI_NODATA", None):  # Symbol not defined on FreeBSD

However I wonder if it would be reasonable to set this constant (and similar undefined error codes) to a dummy value like None by default in the module. The documentation already says “for a few symbols, default values are provided”.

----------
nosy: +martin.panter

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25138>
_______________________________________


More information about the Python-bugs-list mailing list