def connect(self, conn=None):
        utils.cancel_timeout(self._reconnect_timeout)
        self._reconnect_timeout = None
        self.cleanup()
        host = self._host
        port = self._port

        self._empty_selects = 0

        # Only use proxy.floobits.com if we're trying to connect to floobits.com
        G.OUTBOUND_FILTERING = G.OUTBOUND_FILTERING and self.host == 'floobits.com'

        # TODO: Horrible code here
        if self.proxy:
            if G.OUTBOUND_FILTERING:
                port = self.start_proxy(G.OUTBOUND_FILTER_PROXY_HOST, G.OUTBOUND_FILTER_PROXY_PORT)
            else:
                port = self.start_proxy(self.host, self.port)
        elif G.OUTBOUND_FILTERING:
            host = G.OUTBOUND_FILTER_PROXY_HOST
            port = G.OUTBOUND_FILTER_PROXY_PORT

        self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self._sock.setblocking(False)
        if self._secure:
            with open(self._cert_path, 'wb') as cert_fd:
                cert_fd.write(cert.CA_CERT.encode('utf-8'))
        conn_msg = '%s:%s: Connecting...' % (self.host, self.port)
        if self.port != self._port or self.host != self._host:
            conn_msg += ' (proxying through %s:%s)' % (self._host, self._port)
        if host != self._host:
            conn_msg += (host, port) % ' (proxying through %s:%s)'
        msg.log(conn_msg)
        editor.status_message(conn_msg)
        self._connect(host, port)
dataset/ETHPy150Open Floobits/floobits-sublime/floo/common/protocols/floo_proto.py/FlooProtocol.connect/swapped operands of `%`