diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-10 00:20:18 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-10 00:20:18 +0000 |
commit | 1d519cde654cf663241a765b9d91e663f8fa1953 (patch) | |
tree | e6369c0fe9573f50323df16aff0ff586b54c95a8 /Lib/imaplib.py | |
parent | 7eaa448e59689999371b40316600c6c9f861c5b2 (diff) | |
download | cpython-git-1d519cde654cf663241a765b9d91e663f8fa1953.tar.gz |
Merged revisions 86388 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86388 | antoine.pitrou | 2010-11-10 01:18:40 +0100 (mer., 10 nov. 2010) | 3 lines
Forward port r86386 after it fixed the 3.1 buildbot issues
........
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r-- | Lib/imaplib.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index c8f32a7b60..357ba83891 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -884,14 +884,17 @@ class IMAP4: def _command_complete(self, name, tag): - self._check_bye() + # BYE is expected after LOGOUT + if name != 'LOGOUT': + self._check_bye() try: typ, data = self._get_tagged_response(tag) except self.abort, val: raise self.abort('command: %s => %s' % (name, val)) except self.error, val: raise self.error('command: %s => %s' % (name, val)) - self._check_bye() + if name != 'LOGOUT': + self._check_bye() if typ == 'BAD': raise self.error('%s command error: %s %s' % (name, typ, data)) return typ, data |