Kaydet (Commit) 36c0dbc9 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Avoid some BytesWarnings when running test_imaplib in verbose mode

üst 9b0034d0
...@@ -60,7 +60,7 @@ class SimpleIMAPHandler(socketserver.StreamRequestHandler): ...@@ -60,7 +60,7 @@ class SimpleIMAPHandler(socketserver.StreamRequestHandler):
timeout = 1 timeout = 1
def _send(self, message): def _send(self, message):
if verbose: print("SENT:", message.strip()) if verbose: print("SENT: %r" % message.strip())
self.wfile.write(message) self.wfile.write(message)
def handle(self): def handle(self):
...@@ -84,7 +84,7 @@ class SimpleIMAPHandler(socketserver.StreamRequestHandler): ...@@ -84,7 +84,7 @@ class SimpleIMAPHandler(socketserver.StreamRequestHandler):
if line.endswith(b'\r\n'): if line.endswith(b'\r\n'):
break break
if verbose: print('GOT:', line.strip()) if verbose: print('GOT: %r' % line.strip())
splitline = line.split() splitline = line.split()
tag = splitline[0].decode('ASCII') tag = splitline[0].decode('ASCII')
cmd = splitline[1].decode('ASCII') cmd = splitline[1].decode('ASCII')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment