[issue21968] 'abort' object is not callable

Walter Dörwald report at bugs.python.org
Tue Jul 15 14:09:45 CEST 2014


Walter Dörwald added the comment:

The problem seems to be in that line:

   except imaplib.IMAP4_SSL.abort, imaplib.IMAP4.abort:

This does *not* catch both exception classes, but catches only IMAP4_SSL.abort and stores the exception object in imaplib.IMAP4.abort.

What you want is:

   except (imaplib.IMAP4_SSL.abort, imaplib.IMAP4.abort):

----------
nosy: +doerwalter

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21968>
_______________________________________


More information about the Python-bugs-list mailing list