]> granicus.if.org Git - python/commitdiff
Piers Lauder:
authorGuido van Rossum <guido@python.org>
Thu, 24 Feb 2000 02:24:50 +0000 (02:24 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 24 Feb 2000 02:24:50 +0000 (02:24 +0000)
A change in my last patch could, under certain circumstances,
cause a loop if the connection to the server dropped while
waiting for a command completion. I've changed the code to
re-raise the error after possible debugging output.

Lib/imaplib.py

index c65cc903322be75850aab7dbe4eaff99c0fedc99..898dd9fccccc76e1418afa114e9ccd371f85ca86 100644 (file)
@@ -15,7 +15,7 @@ Public functions:     Internaldate2tuple
                        Time2Internaldate
 """
 
-__version__ = "2.30"
+__version__ = "2.32"
 
 import binascii, re, socket, string, time, random, sys
 
@@ -755,17 +755,17 @@ class IMAP4:
                                return result
 
                        # Some have reported "unexpected response" exceptions.
-                       # (Isn't this non-IMAP4-compliant behaviour?
-                       # Please mail me details printed below!)
-                       # Anyway, ignore them here.
+                       # Note that ignoring them here causes loops.
+                       # Instead, send me details of the unexpected response and
+                       # I'll update the code in `_get_response()'.
 
                        try:
                                self._get_response()
                        except self.abort, val:
                                if __debug__:
                                        if self.debug >= 1:
-                                               _mesg('abort exception ignored: %s' % val)
                                                print_log()
+                               raise
 
 
        def _get_line(self):