poplib - retr() getting stuck
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Tue Jun 24 04:46:43 EDT 2008
En Fri, 20 Jun 2008 04:37:32 -0300, Roopesh <roopesh.raj at gmail.com>
escribió:
> I am using poplib's retr() to fetch mails from my gmail account. It
> works fine, in some cases it gets stuck inside the retr() method and
> does not come out.
Probably the server stopped responding. By default, sockets have no
timeout value set - that is, a recv() call may block forever.
Try using socket.setdefaulttimeout
<http://docs.python.org/lib/module-socket.html> before creating the
connection, or search this group for past responses to this same problem.
--
Gabriel Genellina
More information about the Python-list
mailing list