mirror of
https://github.com/python/cpython.git
synced 2025-12-05 00:52:25 +00:00
Avoid some BytesWarnings when running test_imaplib in verbose mode
This commit is contained in:
parent
9b0034d040
commit
36c0dbc9be
1 changed files with 2 additions and 2 deletions
|
|
@ -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):
|
||||||
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')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue