Message6661

Author irmen
Recipients irmen
Date 2011-10-08.00:02:00
SpamBayes Score 1.6303907e-09
Marked as misclassified No
Message-id <1318032120.45.0.249962377316.issue1804@psf.upfronthosting.co.za>
In-reply-to
Content
_tcpsocket doesn't have 'type' and 'proto' attributes so accessing these on socket objects crashes with AttributeError

Reproduce session:

[E:\Projects]\jython25\jython.bat
Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_26
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>> s.type
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\jython25\Lib\socket.py", line 1269, in <lambda>
    type = property(lambda self: self._sock.type, doc="the socket type")
AttributeError: _tcpsocket instance has no attribute 'type'
>>> s.proto
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\jython25\Lib\socket.py", line 1270, in <lambda>
    proto = property(lambda self: self._sock.proto, doc="the socket protocol")
AttributeError: _tcpsocket instance has no attribute 'proto'
>>>
History
Date User Action Args
2011-10-08 00:02:00irmensetrecipients: + irmen
2011-10-08 00:02:00irmensetmessageid: <1318032120.45.0.249962377316.issue1804@psf.upfronthosting.co.za>
2011-10-08 00:02:00irmenlinkissue1804 messages
2011-10-08 00:02:00irmencreate