IMAP: UIDPLUS: correctly warn about weird responses from some servers

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/455
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2017-04-26 19:18:35 +02:00
parent e9d8e87a71
commit e8f0e82f6c

View File

@ -686,6 +686,8 @@ class IMAPFolder(BaseFolder):
return 0
try:
uid = int(resp[-1].split(' ')[1])
except ValueError as e:
uid = 0 # Definetly not what we should have.
except Exception as e:
raise OfflineImapError("Unexpected response: %s"% str(resp),
OfflineImapError.ERROR.MESSAGE)