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))
def __forceRedraw(self): self._invalidate() try: loop = getLoop() except ValueError: pass # No loop yet, so don't redraw else: loop.draw_screen()
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)
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 )))