Closed
Description
Originally reported by: Menno Smits (Bitbucket: mjs0)
As per RFC 4551, if a MODSEQ search criteria is used a "(MODSEQ nnnnn)" string is added to the end of the SEARCH response. IMAPClient currently tracebacks if this is seen.
Example:
>>> c.debug = True
>>> c.search(['modseq 40000'])
40:47.050391 > NNBA5 UID SEARCH (modseq 40000)
40:47.379831 < * SEARCH 60341 60424 63814 63815 (MODSEQ 51101)
40:47.380047 < NNBA5 OK Search completed (0.000 secs).
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "imapclient/imapclient.py", line 569, in search
return self._search(normalise_search_criteria(criteria), charset)
File "imapclient/imapclient.py", line 605, in _search
return [long(i) for i in data.split()]
ValueError: invalid literal for long() with base 10: '(MODSEQ'
(Reported by Karim@Inbox)