summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-02-07 13:44:57 -0500
committerR David Murray <rdmurray@bitdance.com>2014-02-07 13:44:57 -0500
commit95ff7239bda51a234e04b1ad81c377fdf702faec (patch)
treee102c7c16c1c1a053fc85f6b9b97dafc0a95951c /Lib/imaplib.py
parentMerge: #19063: the unicode-in-set_payload problem isn't getting fixed in 3.4. (diff)
downloadcpython-95ff7239bda51a234e04b1ad81c377fdf702faec.tar.gz
cpython-95ff7239bda51a234e04b1ad81c377fdf702faec.tar.bz2
cpython-95ff7239bda51a234e04b1ad81c377fdf702faec.zip
#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.
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r--Lib/imaplib.py5
1 files changed, 5 insertions, 0 deletions
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