Avoid some BytesWarnings when running test_imaplib in verbose mode

This commit is contained in:
Antoine Pitrou 2010-11-16 17:49:46 +00:00
parent 9b0034d040
commit 36c0dbc9be
1 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ class SimpleIMAPHandler(socketserver.StreamRequestHandler):
timeout = 1
def _send(self, message):
if verbose: print("SENT:", message.strip())
if verbose: print("SENT: %r" % message.strip())
self.wfile.write(message)
def handle(self):
@ -84,7 +84,7 @@ class SimpleIMAPHandler(socketserver.StreamRequestHandler):
if line.endswith(b'\r\n'):
break
if verbose: print('GOT:', line.strip())
if verbose: print('GOT: %r' % line.strip())
splitline = line.split()
tag = splitline[0].decode('ASCII')
cmd = splitline[1].decode('ASCII')