diff options
author | Guido van Rossum <guido@python.org> | 2007-06-18 18:26:36 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-06-18 18:26:36 (GMT) |
commit | c43e79f3c87ebf19fec2e481068bf48262096716 (patch) | |
tree | 06558df755dbef762df2f222a89272d053b19f1d /Lib/smtplib.py | |
parent | 7eaf8223a03a6b11203d750284b35d8a5f27b4f0 (diff) | |
download | cpython-c43e79f3c87ebf19fec2e481068bf48262096716.zip cpython-c43e79f3c87ebf19fec2e481068bf48262096716.tar.gz cpython-c43e79f3c87ebf19fec2e481068bf48262096716.tar.bz2 |
Fix a buch of shallow test failures.
Note: in test_fileinput.py, two tests are disabled until I figure out how
to replace these.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-x | Lib/smtplib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py index 299a70d..67904a2 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 |