def lineReceived(self, line):
        """ Manage state/mode after connection. Code uses states to take
            credential input and then starts terminal input.

            @param line:    line typed on terminal
            @type  line:    string
        """
        def _cbError(why, msg):
            err(why, msg)
            reactor.stop()  #@UndefinedVariable

        def _cbConnectionSuccess(view):
            self._user = view

            if isinstance(self._user, dict):
                self._privilege = 'console'
            else:
                self._privilege = 'admin'

            self.terminal.write('Connection to Master Established.')
            self.showPrompt()

        if self._mode is 'Username':
            self._mode = 'Password'
            self._username = line
            self.terminal.write('Password: ')
        elif self._mode == 'Password':
            self._mode = 'Terminal'
            self._password = line
            cred = UsernamePassword(self._username,
                                    sha256(self._password).hexdigest())
            d = self._factory.login(cred)
            d.addCallback(lambda p: p.callRemote("getUserView", True))
            d.addCallback(_cbConnectionSuccess)
            d.addErrback(_cbError, "Username/password login failed")
        else:
            self.parseInputLine(line)
dataset/ETHPy150Open rapyuta/rce/rce-console/rce/console/console.py/ConsoleClient.lineReceived/operator `==` -> `is`