From e8f0e82f6cff83a809d792e264154cc99eb1faaa Mon Sep 17 00:00:00 2001 From: Nicolas Sebrecht Date: Wed, 26 Apr 2017 19:18:35 +0200 Subject: [PATCH] IMAP: UIDPLUS: correctly warn about weird responses from some servers Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/455 Signed-off-by: Nicolas Sebrecht --- offlineimap/folder/IMAP.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py index 6939318..aa17c1a 100644 --- a/offlineimap/folder/IMAP.py +++ b/offlineimap/folder/IMAP.py @@ -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)