def _next_XMIT_2(self, intent):
        # Got connected, ready to send
        if not hasattr(intent, 'socket'):
            intent.stage = self._XMITStepRetry
            return self._nextTransmitStep(intent)
        try:
            #intent.socket.sendall(intent.serMsg)
            intent.amtSent += intent.socket.send(intent.serMsg[intent.amtSent:])
        except socket.error as err:
            if err_send_inprogress(err.errno):
                intent.backoffPause(True)
                return True
            if err_send_connrefused(err):
                # in non-blocking, sometimes connection attempts are
                # discovered here rather than for the actual connect
                # request.
                thesplog('ConnRefused to %s; declaring as DeadTarget.',
                         intent.targetAddr, level=logging.ERROR)
                return self._finishIntent(intent, SendStatus.DeadTarget)
            thesplog('Socket error sending to %s on %s: %s / %s: %s',
                     intent.targetAddr, intent.socket, str(err), err.errno,
                     intent, level=logging.ERROR)
            intent.stage = self._XMITStepRetry
            return self._nextTransmitStep(intent)
        except Exception:
            import traceback
            thesplog('Error sending: %s', traceback.format_exc(), level=logging.ERROR)
            intent.stage = self._XMITStepRetry
            return self._nextTransmitStep(intent)
        if len(intent.serMsg) >= intent.amtSent:
            intent.stage = self._XMITStepShutdownWrite  # After data is sent, stop transmit
        return True
dataset/ETHPy150Open godaddy/Thespian/thespian/system/transport/TCPTransport.py/TCPTransport._next_XMIT_2/swapped operands of `>=`