imapidle icon indicating copy to clipboard operation
imapidle copied to clipboard

Handle empty server response when logged off due to inactivity

Open bkg opened this issue 12 years ago • 0 comments

I am seeing an error when idling on a gmail inbox and the server logs the user out after a period of time. From a close look at the IDLE spec, this is legitimate behavior. Specifically, the stack trace is:

Traceback (most recent call last):
  File "imapidle/src/imapidle.py", line 64, in <module>
    for uid, msg in mbox.idle():
  File "imapidle/src/imapidle.py", line 21, in idle
    uid, message = resp[2:-2].split(' ')
ValueError: need more than 1 value to unpack

This change adds error handling for the above case. I have been able to idle on a gmail account for multiple days now.

BTW, thanks for this, it has proven to be very useful!

bkg avatar Aug 28 '13 08:08 bkg