Socket error problem

Martin v. Loewis martin at v.loewis.de
Sun Jun 9 23:03:02 CEST 2002


"David LeBlanc" <whisper at oz.net> writes:

> I've put print statements around all this before I first tryed the ml, but
> here they are again:

This is still not the right place.

>         print 'poplib._init__: self.host = %s ' % self.host, 'self.port =
> %s' % self.port

Notice that host and port are not passed directly to socket. Instead,
getaddrinfo is used

>         for res in socket.getaddrinfo(self.host, self.port, 0,
> socket.SOCK_STREAM):
>             af, socktype, proto, canonname, sa = res
>             try:

Please add a line printing res inside of this try statement. Also add
a print statement between the socket call and the connect call, so
that we know which call it is that fails.

Regards,
Martin





More information about the Python-list mailing list