def send(self, s):
        if self.sock is None:
            self.createSocket()
        #self.sock can be None either because we haven't reached the retry
        #time yet, or because we have reached the retry time and retried,
        #but are still unable to connect.
        if self.sock:
            try:
                if hasattr(self.sock, "sendall"):
                    self.sock.sendall(s)
                else:
                    sentsofar = 0
                    left = len(s)
                    while left > 0:
                        sent = self.sock.send(s[sentsofar:])
                        sentsofar = sentsofar + sent
                        left = left - sent
            except socket.error:
                self.sock.close()
                self.sock = None  # so we can call createSocket next time
Updates an entry in the list of known filenames.
dataset/ETHPy150Open babble/babble/include/jython/Lib/logging/handlers.py/SocketHandler.send--crossover with--dataset/ETHPy150Open google/transitfeed/transitfeed/gtfsfactory.py/GtfsFactory.UpdateMapping