From c43e79f3c87ebf19fec2e481068bf48262096716 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 18 Jun 2007 18:26:36 +0000 Subject: Fix a buch of shallow test failures. Note: in test_fileinput.py, two tests are disabled until I figure out how to replace these. --- Lib/smtplib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/smtplib.py') diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 299a70d023..67904a2f7a 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -348,7 +348,7 @@ class SMTP: self.close() raise SMTPServerDisconnected("Connection unexpectedly closed") if self.debuglevel > 0: print('reply:', repr(line), file=stderr) - resp.append(line[4:].strip()) + resp.append(line[4:].strip(b' \t\n')) code=line[:3] # Check that the error code is syntactically correct. # Don't attempt to read a continuation line if it is broken. @@ -361,7 +361,7 @@ class SMTP: if line[3:4]!="-": break - errmsg = "\n".join(resp) + errmsg = b"\n".join(resp) if self.debuglevel > 0: print('reply: retcode (%s); Msg: %s' % (errcode,errmsg), file=stderr) return errcode, errmsg -- cgit v1.2.1