Message78505
Yes. The patch is against 2.6. It uses the socket.create_connection()
helper function, which was added in 2.6. See http://svn.python.org/view?
rev=54546&view=rev for the commit message.
If you really want to apply it to 2.5, it's trivial to adapt the patch.
Just replace the call to create_connection() with something like this:
msg = "getaddrinfo returns an empty list"
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
af, socktype, proto, canonname, sa = res
sock = None
try:
sock = socket(af, socktype, proto)
if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
sock.settimeout(timeout)
sock.connect(sa)
self.sock = sock
except error, msg:
if sock is not None:
sock.close()
raise error, msg |
|
Date |
User |
Action |
Args |
2008-12-30 05:01:58 | dmorr | set | recipients:
+ dmorr, giampaolo.rodola, morrowc |
2008-12-30 05:01:58 | dmorr | set | messageid: <1230613318.27.0.332005704491.issue1664@psf.upfronthosting.co.za> |
2008-12-30 05:01:57 | dmorr | link | issue1664 messages |
2008-12-30 05:01:56 | dmorr | create | |
|