poplib - retr() getting stuck

Roopesh roopesh.raj at gmail.com
Fri Jun 20 09:37:32 CEST 2008


Hi,

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.

>From the logs I could find that when retr() is called, it stops
executing further statements, nor does it throw an exceptions but
simply stops. My code is roughly like the foll:

try:
    print "1"
    mymsg = M.retr(msg_no)
    print "2"
except  poplib.error_proto, e:
    print "exception1"
except Exception, e:
    print "exception2"

What can be the reason for this? Can anyone help me.

Thanks
Roopesh



More information about the Python-list mailing list