def _doLogin(self):
        idParams = {}

        idParams['host'] = self._hostEntry.get_text()
        idParams['port'] = self._portEntry.get_text()
        idParams['identityName'] = self._identityNameEntry.get_text()
        idParams['password'] = self._passwordEntry.get_text()

        try:
            idParams['port'] = int(idParams['port'])
        except __HOLE__:
            pass

        f = pb.PBClientFactory()
        from twisted.internet import reactor
        reactor.connectTCP(idParams['host'], idParams['port'], f)
        creds = UsernamePassword(idParams['identityName'], idParams['password'])
        d = f.login(creds, self.client)
        def _timeoutLogin():
            self._timeoutID = None
            d.errback(failure.Failure(defer.TimeoutError("Login timed out.")))
        self._timeoutID = reactor.callLater(30, _timeoutLogin)
        d.addCallbacks(self._cbGotPerspective, self._ebFailedLogin)
        self.statusMsg("Contacting server...")

        # serviceName = self._serviceNameEntry.get_text()
        # perspectiveName = self._perspectiveNameEntry.get_text()
        # if not perspectiveName:
        #     perspectiveName = idParams['identityName']

        # d = _identityConnector.requestService(serviceName, perspectiveName,
        #                                       self.client)
        # d.addCallbacks(self._cbGotPerspective, self._ebFailedLogin)
        # setCursor to waiting
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/spread/ui/gtk2util.py/LoginDialog._doLogin