Commit 9836b919 authored by R David Murray's avatar R David Murray

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.
parent 8896aa43
......@@ -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__:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment