Alan

this is also fine with me. From the the linked discussion I think it's the only solution.

best wishes,
Oti.

On 6/30/07, Alan Kennedy <jython-dev@xhaus.com> wrote:
Dear all,

I'm writing to seek input on how to deal with two error conditions that
can arise with the socket and select modules that are not covered by
existing constants in the errno module.

1. jython/java has a limitation that channels can only be
multiplexed/select'ed if they are in non-blocking mode. If the user
attempts to register a socket in blocking mode, they currently get a
java IllegalBlockingModeException.

I would like to map this to a more pythonic select.error message, which
is straightforward. However, there is no suitable symbolic constant in
the errno module (which is derived from cpython), because cpython does
not have the same blocking/non-blocking restriction.

I have documented this restriction on the select module wiki page

http://wiki.python.org/jython/SelectModule

So this would require a jython-specific errno.SYMBOLIC_CONSTANT for the
scenario. Unless someone has a suggestion on which existing errno to use?

2. When a non-existent hostname is passed to the socket.getaddrinfo
function, an exception is raised, with an errno that has no
corresponding symbolic constant in the errno module.

I raised this one on python-dev, to see if there was a supposed to be a
corresponding symbolic constant in the errno module, but didn't get any
specific information.

http://mail.python.org/pipermail/python-dev/2007-June/073717.html

So I'm open to suggestions on both of these issues.

Or should I just go ahead and invent some new error codes?

Regards,

Alan.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jython-dev mailing list
Jython-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-dev