[Python-checkins] r86389 - in python/branches/release27-maint: Lib/imaplib.py

antoine.pitrou python-checkins at python.org
Wed Nov 10 01:20:18 CET 2010


Author: antoine.pitrou
Date: Wed Nov 10 01:20:18 2010
New Revision: 86389

Log:
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
........


Modified:
   python/branches/release27-maint/   (props changed)
   python/branches/release27-maint/Lib/imaplib.py

Modified: python/branches/release27-maint/Lib/imaplib.py
==============================================================================
--- python/branches/release27-maint/Lib/imaplib.py	(original)
+++ python/branches/release27-maint/Lib/imaplib.py	Wed Nov 10 01:20:18 2010
@@ -884,14 +884,17 @@
 
 
     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


More information about the Python-checkins mailing list