athoune / imapidle

Handling IMAP IDLE command with plain old Python.
MIT License
33 stars 10 forks source link

Fix for handling long server responce #4

Open grisov opened 8 years ago

grisov commented 8 years ago

When handle long server response like this:

"* 29 FETCH (FLAGS () UID 186)\n"

we have an error:

Traceback (most recent call last): File "imapidle\src\imapidle.py", line 15, in idle uid, message = resp[2:-2].split(' ') ValueError: too many values to unpack

This small change adds error handling for the above case.