Ignore return value of sendall; it's not None on py < 3.6.

https://bugs.python.org/issue25951
This commit is contained in:
Valentin Lorentz 2019-12-08 22:36:56 +01:00
parent 373c705247
commit b4873fdea4

View File

@ -173,11 +173,9 @@ class BaseClientTestCase(_IrcTestCase):
if not filter_pred or filter_pred(msg):
return msg
def sendLine(self, line):
ret = self.conn.sendall(line.encode())
assert ret is None
self.conn.sendall(line.encode())
if not line.endswith('\r\n'):
ret = self.conn.sendall(b'\r\n')
assert ret is None
self.conn.sendall(b'\r\n')
if self.show_io:
print('{:.3f} S: {}'.format(time.time(), line.strip()))