mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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.
This commit is contained in:
parent
5ebfa2ae9f
commit
19ce91be92
1 changed files with 5 additions and 5 deletions
|
@ -15,7 +15,7 @@ Public functions: Internaldate2tuple
|
||||||
Time2Internaldate
|
Time2Internaldate
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "2.30"
|
__version__ = "2.32"
|
||||||
|
|
||||||
import binascii, re, socket, string, time, random, sys
|
import binascii, re, socket, string, time, random, sys
|
||||||
|
|
||||||
|
@ -755,17 +755,17 @@ class IMAP4:
|
||||||
return result
|
return result
|
||||||
|
|
||||||
# Some have reported "unexpected response" exceptions.
|
# Some have reported "unexpected response" exceptions.
|
||||||
# (Isn't this non-IMAP4-compliant behaviour?
|
# Note that ignoring them here causes loops.
|
||||||
# Please mail me details printed below!)
|
# Instead, send me details of the unexpected response and
|
||||||
# Anyway, ignore them here.
|
# I'll update the code in `_get_response()'.
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self._get_response()
|
self._get_response()
|
||||||
except self.abort, val:
|
except self.abort, val:
|
||||||
if __debug__:
|
if __debug__:
|
||||||
if self.debug >= 1:
|
if self.debug >= 1:
|
||||||
_mesg('abort exception ignored: %s' % val)
|
|
||||||
print_log()
|
print_log()
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
def _get_line(self):
|
def _get_line(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue