From 95ff7239bda51a234e04b1ad81c377fdf702faec Mon Sep 17 00:00:00 2001 From: R David Murray Date: Fri, 7 Feb 2014 13:44:57 -0500 Subject: #20013: don't raise socket error when selected mailbox deleted. I'm checking this in without a test because not much of this code is tested and I don't have time to work up the necessary extensions to the existing test framework. The patch itself was tested by the person who reported the bug. --- Lib/imaplib.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Lib/imaplib.py') diff --git a/Lib/imaplib.py b/Lib/imaplib.py index ade2f9c2aa0..ad104fe76a7 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -1063,6 +1063,11 @@ class IMAP4: del self.tagged_commands[tag] return result + # If we've seen a BYE at this point, the socket will be + # closed, so report the BYE now. + + self._check_bye() + # Some have reported "unexpected response" exceptions. # Note that ignoring them here causes loops. # Instead, send me details of the unexpected response and -- cgit v1.2.3