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 <rep...@bugs.python.org> <http://bugs.python.org/issue25138> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com