Beispiel #1
0
    def _process_new_token(self, app_name, email, credentials, ping_url):
        """Process a new set of credentials for 'email'."""
        if ping_url:
            yield utils.ping_url(ping_url, email, credentials)
            logger.info('Url %r successfully opened!', ping_url)

        yield Keyring().set_credentials(app_name, credentials)
Beispiel #2
0
    def __init__(self, retry=False, domain=None):
        """Create a new instance."""
        super(ProxyCredsDialog, self).__init__()

        if domain is None:
            logger.debug('Domain passed as None.')
            domain = ''
        self.domain = domain
        self.keyring = Keyring()
        self.ui = Ui_ProxyCredsDialog()
        self.ui.setupUi(self)
        # lets set the different basic contents for the ui
        self._set_labels()
        self._set_buttons()
        self._set_icon()
        if retry:
            self._load_creds()
            self.ui.error_label.setVisible(True)
        else:
            self.ui.error_label.setVisible(False)