def on_password_clear_finish(source, result, data): try: password_removed = Secret.password_clear_finish(result) if password_removed: logging.debug('Cleared password for: {}'.format(old_email)) else: logging.debug( 'No password found to clear for: {}'.format(old_email)) except GLib.Error as e: logging.error( 'Failed to clear password for: {}, Error: {}'.format( old_email, e)) if callback: callback(False) else: Secret.password_store( self._account_schema, {'email': new_email}, self._current_collection, 'Pandora Account', password, None, on_password_store_finish, None, )
def on_password_clear_finish(source, result, data): try: password_removed = Secret.password_clear_finish(result) if password_removed: logging.debug('Cleared password for: {}'.format(old_email)) else: logging.debug('No password found to clear for: {}'.format(old_email)) except GLib.Error as e: logging.error('Failed to clear password for: {}, Error: {}'.format(old_email, e)) if callback: callback(False) else: Secret.password_store( self._account_schema, {'email': new_email}, self._current_collection, 'Pandora Account', password, None, on_password_store_finish, None, )
def on_result_ready(source, result, unused): loop.quit() deleted = Secret.password_clear_finish(result) self.assertEquals(False, deleted)