diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 30f51da9b44..ce32c801915 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__: