diff options
author | R David Murray <rdmurray@bitdance.com> | 2015-04-16 22:54:56 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2015-04-16 22:54:56 (GMT) |
commit | 37f1ba915b87486d497daf9d57f459833240ceed (patch) | |
tree | fc573ecf1d8eed80fe86f8a0868c5b6ad1f70ff2 /Lib/smtplib.py | |
parent | 2e6ad4267c68505ed0cafaa1704f788b327771ff (diff) | |
download | cpython-37f1ba915b87486d497daf9d57f459833240ceed.zip cpython-37f1ba915b87486d497daf9d57f459833240ceed.tar.gz cpython-37f1ba915b87486d497daf9d57f459833240ceed.tar.bz2 |
#16914: fix test errors under -W error::BytesWarning.
There are doubtless other debug messages in smtplib that would trigger an
error if they were tested, but this fixes the things we do now test,
which is good enough for now.
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 c559a4c..7f49f23 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -328,7 +328,7 @@ class SMTP: self.file = None (code, msg) = self.getreply() if self.debuglevel > 0: - self._print_debug('connect:', msg) + self._print_debug('connect:', repr(msg)) return (code, msg) def send(self, s): @@ -400,7 +400,7 @@ class SMTP: errmsg = b"\n".join(resp) if self.debuglevel > 0: - self._print_debug('reply: retcode (%s); Msg: %s' % (errcode, errmsg)) + self._print_debug('reply: retcode (%s); Msg: %a' % (errcode, errmsg)) return errcode, errmsg def docmd(self, cmd, args=""): |