summaryrefslogtreecommitdiff
path: root/Lib/imaplib.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-06-28 14:52:57 -0400
committerR David Murray <rdmurray@bitdance.com>2013-06-28 14:52:57 -0400
commit3bca8ac3d0296ca152c2a5462720fabb76abade5 (patch)
treec0e7e05983a32bcaf46c926aeefed23693fbccea /Lib/imaplib.py
parent9a2f139ba0378fbdf3d68f13eebe2a0ca1f022b8 (diff)
downloadcpython-git-3bca8ac3d0296ca152c2a5462720fabb76abade5.tar.gz
Improve imap error message in unusual failure mode.
We ran into this during the sprits at PyCon and this patch has been sitting on my disk ever since. This just adds some information to the error message that we found useful during debugging. There's no good way to add a test, since the message only got generated via code that we had modified for debugging purposes.
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r--Lib/imaplib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index 30f51da9b4..ce32c80191 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -1073,7 +1073,7 @@ class IMAP4:
# Protocol mandates all lines terminated by CRLF
if not line.endswith(b'\r\n'):
- raise self.abort('socket error: unterminated line')
+ raise self.abort('socket error: unterminated line: %r' % line)
line = line[:-2]
if __debug__: