def send_packed_command(self, command):
        if not self._sock:
            self.connect()
        try:
            self._sock.sendall(command)
        except socket.error:
            e = sys.exc_info()[1]
            self.disconnect()
            if len(e.args) == 1:
                _errno, errmsg = 'UNKNOWN', e.args[0]
            else:
                _errno, errmsg = e.args
            raise ConnectionError("Error %s while writing to socket. %s." %
                                  (_errno, errmsg))
        except:
            self.disconnect()
            raise
@__init__
dataset/ETHPy150Open andymccurdy/redis-py/benchmarks/command_packer_benchmark.py/StringJoiningConnection.send_packed_command--crossover with--dataset/ETHPy150Open jeff1evesque/machine-learning/log/logger.py/Logger.log