def handshake(self):
        """Do the blame handshake with the server.

        connect MUST have been called before this
        """
        if not self.blame_sock:
            raise ValueError("Connection not created before call to handshake")
        headers = self.build_headers()
        f = self.blame_sock.makefile()
        f.write("nogotofail_ctl/1.0\n" +
                "\n".join(((key, value) % "%s: %s" for key, value in headers.iteritems())) +
                "\n\n")
        f.flush()

        line = f.readline().strip()
        if line.split(" ")[0] != "0":
            raise ValueError("Server rejected handshake")
        while True:
            line = f.readline().strip()
            if not line:
                break
            key, value = line.split(":", 1)
            self.resp_headers[key.strip()] = value.strip()
        self.handshake_completed = True
dataset/ETHPy150Open google/nogotofail/nogotofail/clients/linux/pyblame/blame.py/BlameConnection.handshake/swapped operands of `%`