Esempio n. 1
0
    def loginSuccess(self, a_base_uri, a_auth):
        updated_vals = {
            'server_uri': self.__settings_widget.server_uri,
            'username': self.__settings_widget.username,
            'password': self.__settings_widget.password,
        }

        urwid.emit_signal(self, SIG_CONFIG_UPDATED, updated_vals)
        self.__showPalm('Logging in...SUCCESS!')
        self.msg = 'logged in as <%s>' % self.__settings_widget.username
        getLoop().set_alarm_in(1, lambda a_loop, a_user_data: self.showMain())
        getLoop().set_alarm_in(1, lambda a_loop, a_user_data: urwid.emit_signal(self, SIG_REQ_PRISONERS, a_auth))
Esempio n. 2
0
    def __forceRedraw(self):
        self._invalidate()

        try:
            loop = getLoop()
        except ValueError:
            pass # No loop yet, so don't redraw
        else:
            loop.draw_screen()
Esempio n. 3
0
    def dbgErrbackTODO(self, *a_args, **a_kwargs):
        print('dbgErrbackTODO')
        def interact(*a_args, **a_kwargs):
            exc = [ None ]

            local = dict(globals())
            local.update(locals())
            import code
            code.interact(local = local)

            if exc[0] is not None:
                raise exc[0]

        from bahaman.util import getLoop
        interact = getLoop().event_loop.handle_exit(interact)

        return interact(self, *a_args, **a_kwargs)
Esempio n. 4
0
 def newAccountSuccess(self, a_auth):
     self.__showPalm('Creating new account...SUCCESS!')
     getLoop().set_alarm_in(1, lambda a_loop, a_user_data: self.__logIn(self.__settings_widget.server_uri, ( self.__settings_widget.username, self.__settings_widget.password )))