def send_packed_command(self, command):
    'Send an already packed command to the Redis server'
    if (not self._sock):
        self.connect()
    try:
        if isinstance(command, str):
            command = [command]
        for item in command:
            self._sock.sendall(item)
    except socket.timeout:
        self.disconnect()
        raise TimeoutError('Timeout writing to socket')
    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
Send an already packed command to the Redis server
def send_packed_command(self, command):
    
    if (not self._sock):
        self.connect()
    try:
        if isinstance(command, str):
            command = [command]
        for item in command:
            self._sock.sendall(item)
    except socket.timeout:
        self.disconnect()
        raise TimeoutError('Timeout writing to socket')
    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