diff options
author | Guido van Rossum <guido@python.org> | 2000-02-24 02:24:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-02-24 02:24:50 (GMT) |
commit | 19ce91be92a31f4c24c0c5a88c568ae3b31f8fc6 (patch) | |
tree | 4ee5ffd7b25fa23b394a2ee84cb252dd0d396c92 /Lib/imaplib.py | |
parent | 5ebfa2ae9f519d7bc79d2c27d91380691f680df0 (diff) | |
download | cpython-19ce91be92a31f4c24c0c5a88c568ae3b31f8fc6.zip cpython-19ce91be92a31f4c24c0c5a88c568ae3b31f8fc6.tar.gz cpython-19ce91be92a31f4c24c0c5a88c568ae3b31f8fc6.tar.bz2 |
Piers Lauder:
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.
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r-- | Lib/imaplib.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index c65cc90..898dd9f 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -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): |