def start_backend(self): """Start the backend, show the window when ready.""" client = yield main.get_sso_client() self.backend = client.sso_login logger.debug('UbuntuSSOClientGUI: backend created: %r', self.backend) self._setup_signals() self._append_pages() self.window.show()
def setup_page(self): """Setup the widget components.""" logger.info('Starting setup_page for: %r', self) # pylint: disable=W0702,W0703 try: # Get Backend client = yield main.get_sso_client() self.backend = client.sso_login self._set_translated_strings() self._connect_ui() # Call _setup_signals at the end, so we ensure that the UI # is at least styled as expected if the operations with the # backend fails. self._setup_signals() except: message = 'There was a problem trying to setup the page %r' % self self.show_error(message) logger.exception(message) self.setEnabled(False) # pylint: enable=W0702,W0703 logger.info('%r - setup_page ends, backend is %r.', self, self.backend)
def get_creds_proxy(): """Get the CredentialsManagement proxy.""" client = yield get_sso_client() result = CredentialsManagement(client.cred_manager) defer.returnValue(result)