def flush(self):
    try:
        self._connection.send(b''.join(self._buffer))
    except socket.error as e:
        logger.error(("Couldn't send data over socket: %s" % e))
    self._buffer = []
def flush(self):
    try:
        self._connection.send(b.join(self._buffer))
    except socket.error as e:
        logger.error(("Couldn't send data over socket: %s" % e))
    self._buffer = []