Message6681

Author irmen
Recipients irmen
Date 2011-10-17.19:59:03
SpamBayes Score 1.4176307e-05
Marked as misclassified No
Message-id <1318881543.68.0.245799998575.issue1809@psf.upfronthosting.co.za>
In-reply-to
Content
socket.getaddrinfo sometimes returns an object that crashes in __str__ (so it can't be printed). This is caused by a port number being None where a format string expects an int (%d).

Reproduce session:

>>> import socket
>>> socket.getaddrinfo("",None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\projects\jython\dist\Lib\socket.py", line 647, in __str__
    return "('%s', %d)" % (self.sockaddr, self.port)
TypeError: int argument required
>>>
History
Date User Action Args
2011-10-17 19:59:03irmensetrecipients: + irmen
2011-10-17 19:59:03irmensetmessageid: <1318881543.68.0.245799998575.issue1809@psf.upfronthosting.co.za>
2011-10-17 19:59:03irmenlinkissue1809 messages
2011-10-17 19:59:03irmencreate