From 1329f4dfb86411a8eae3d74a518523c15cec06f3 Mon Sep 17 00:00:00 2001 From: VG Date: Tue, 22 Dec 2015 17:46:09 +0100 Subject: fix exception handling syntax error --- climl_imap_bridge.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/climl_imap_bridge.py b/climl_imap_bridge.py index be0864a..9466a96 100644 --- a/climl_imap_bridge.py +++ b/climl_imap_bridge.py @@ -52,8 +52,9 @@ def connect_to_imap(conf, password): try: yield connection - except IMAPClient.AbortError, socket.error, socket.timeout, \ - backports.ssl.SSLError, backports.ssl.CertificateError: + connection.logout() + except (imapclient.AbortError, socket.error, socket.timeout, + backports.ssl.SSLError, backports.ssl.CertificateError): raise else: connection.logout() -- cgit v1.2.3