[Python-checkins] cpython: #16914: fix test errors under -W error::BytesWarning.
r.david.murray
python-checkins at python.org
Fri Apr 17 00:55:10 CEST 2015
https://hg.python.org/cpython/rev/e532937914fc
changeset: 95700:e532937914fc
user: R David Murray <rdmurray at bitdance.com>
date: Thu Apr 16 18:54:56 2015 -0400
summary:
#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.
files:
Lib/smtplib.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -328,7 +328,7 @@
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 @@
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=""):
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list