def auth_start(self, **kwargs): if not self.auth_working(): self.auth_status = AUTH_PROCESSING self.auth_data = kwargs self.auth_data.update(start_t=time.time()) t = RunInThread(self.auth_process) t.error_handler = self.auth_error t.result_handler = self.auth_success t.start(**kwargs) else: raise AuthInProgressException()