def run(self):
        """Run the command loop for the blame connection.

        handshake() MUST have been called before this.
        """
        if not self.handshake_completed:
            raise ValueError("Handshake not completed")
        f = self.blame_sock.makefile()
        while True:
            line = f.readline().strip()
            if not line:
                break
            params = line.split(" ")
            tx_id, command = params[:2]
            handler = self.command_handlers.get(command)
            reply_payload = None
            if handler:
                reply_payload = handler(self, params[2:])
            else:
                reply_payload = "ERROR: Unknown command"
            if not reply_payload:
                reply_payload = ""
            f.write("%s %s\r\n" % (tx_id, reply_payload))
            f.flush()
Run the command loop for the blame connection.

        handshake() MUST have been called before this.
        
nogotofail/clients/linux/pyblame/blame.py