def run(self):
        global endflag
        transferDataThreads = []
        thread = 2
        flag = self.clientNum
        endflag.append(False)

        y = transfer2Server(self.server_Conn,self.client_Conn,self.server_Addr,self.client_Addr,flag)
        y.setDaemon(True)
        z = transfer2Client(self.client_Conn,self.server_Conn,self.client_Addr,self.server_Addr,flag)
        z.setDaemon(True)

        transferDataThreads.append(y)
        transferDataThreads.append(z)

        for t in transferDataThreads:
            t.start()
        while True:
            alive = True
            for i in range(int(thread)):
                alive = alive and transferDataThreads[i].isAlive()
                if not alive:
                    time.sleep(3)
                    print self.clientNum % "[Link %s] Connection has closed."
                    break
            break
dataset/ETHPy150Open RicterZ/reprocks/client/reprocks_client.py/control.run/swapped operands of `%`