self.parent.log('X', line)
def _write(self, line):
- self.socket.sendall(line.encode('utf-8', 'backslashreplace')+b"\r\n")
+ self.socket.sendall(line.encode('utf-8', 'surrogateescape')+b"\r\n")
def _getsockerr(self):
try: # SO_ERROR might not exist on all platforms