Message3501

Author amak
Recipients amak, glyph
Date 2008-09-13.12:14:44
SpamBayes Score 3.8010706e-12
Marked as misclassified No
Message-id <1221308085.34.0.127300884207.issue1119@psf.upfronthosting.co.za>
In-reply-to
Content
There are two parts to this bug.

1. The jython socket module is indeed missing the SO_ERROR option constant.
2. Java does not support the SO_ERROR option anyway.

Currrently, the jython socket module supports *all* of the limited set
of socket options available on the java platform; documented here, under
"Socket Options"; SO_ERROR is explicitly not supported.

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

The current behaviour when a non-supported option is requested through
either setsockopt or getsockopt is to raise an exception.

So the resolution on this bug will be 

1. The SO_ERROR constant will be added to the jython socket module
2. But any attempt to use it in [g|s]etsockopt will result in an
exception, like so

try:
  err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
except socket.error, se:
  if se[0] == errno.ENOPROTOOPT:
    print "Socket does not support the SO_ERROR option"

I will check in this fix later today.
History
Date User Action Args
2008-09-13 12:14:45amaksetmessageid: <1221308085.34.0.127300884207.issue1119@psf.upfronthosting.co.za>
2008-09-13 12:14:45amaksetrecipients: + amak, glyph
2008-09-13 12:14:45amaklinkissue1119 messages
2008-09-13 12:14:45amakcreate