From 75f16106da016d2fe01eb62f6696ede6b6116031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Albert?= Date: Mon, 31 Oct 2016 15:47:00 +0100 Subject: [PATCH] Fix utf7 decode error not caught MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Albert Signed-off-by: Nicolas Sebrecht --- offlineimap/imaputil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offlineimap/imaputil.py b/offlineimap/imaputil.py index e2bd280..cc51531 100644 --- a/offlineimap/imaputil.py +++ b/offlineimap/imaputil.py @@ -368,5 +368,5 @@ def decode_mailbox_name(name): try: return ret.decode('utf-7').encode('utf-8') - except UnicodeEncodeError: + except (UnicodeDecodeError, UnicodeEncodeError): return name