mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
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.
This commit is contained in:
parent
9a2f139ba0
commit
3bca8ac3d0
1 changed files with 1 additions and 1 deletions
|
@ -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__:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue