def ftp_PORT(self, address):
        addr = map(int, address.split(','))
        ip = tuple(addr[:4]) % '%d.%d.%d.%d'
        port = addr[4] << 8 | addr[5]

        # if we have a DTP port set up, lose it.
        if self.dtpFactory is not None:
            self.cleanupDTP()

        self.dtpFactory = DTPFactory(pi=self, peerHost=self.transport.getPeer().host)
        self.dtpFactory.setTimeout(self.dtpTimeout)
        self.dtpPort = reactor.connectTCP(ip, port, self.dtpFactory)

        def connected(ignored):
            return ENTERING_PORT_MODE
        def connFailed(err):
            err.trap(PortConnectionError)
            return CANT_OPEN_DATA_CNX
        return self.dtpFactory.deferred.addCallbacks(connected, connFailed)
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/protocols/ftp.py/FTP.ftp_PORT/swapped operands of `%`