def run(self):
        global bufLen
        global endflag
        servPeerName = self.server_Conn.getpeername()
        clientPeerName = self.client_Conn.getpeername()
        while True and not endflag[self.flag]:
            try:
                buf = self.client_Conn.recv(bufLen)
            except:
                print "Connection reset by peer.Program exit."
                for m in endflag:
                    m = True
                sys.exit()
            if buf == '' or buf == '__closed__':
                time.sleep(2)
                self.client_Conn.close()
                endflag[self.flag] = True
                break
            try:
                self.server_Conn.send(buf)
                print (self.currentNum,clientPeerName,servPeerName,len(buf)) % "[Link %s] %s --> %s : %s data"
            except:
                endflag[self.flag] = True
                time.sleep(2)
                self.client_Conn.send('__closed__')
                self.client_Conn.close()
                break
dataset/ETHPy150Open RicterZ/reprocks/client/reprocks_client.py/transfer2Server.run/swapped operands of `%`