def delete_password(self, service, username): """Delete the password for the username of the service. """ service = _escape_for_s3(service) username = _escape_for_s3(username) prefix = self._get_s3_key(service, username) try: objects = list(self.bucket.objects.filter(Prefix=prefix)) if len(objects) == 0: msg = ("Password for {service}/{username} not found" ).format(service=service, username=username) raise PasswordDeleteError(msg) elif len(objects) > 1: msg = ("Multiple objects in bucket {bucket} match the prefix " "{prefix}.").format(bucket=self.bucket.name, prefix=prefix) else: objects[0].delete() except EndpointConnectionError: if self.use_local_keyring: # Can't connect to S3: fallback to OS keyring print("WARNING: can't connect to S3, deleting from OS keyring", file=sys.stderr) else: raise # Delete also in the local keyring try: keyring.delete_password(service, username) except PasswordDeleteError: # It's OK: the password was not available in the local keyring print("WARNING: {}/{} not found in OS keyring".format( service, username))
def get_user_pass(self, _, reset=False): if reset is True: with app.open('user', 'r') as f: user = f.read() keyring.delete_password("umma", user) # delete password with app.open('user','w') as f: os.remove(f.name) try: with app.open('user', 'r') as f: user = f.read() except IOError: w = rumps.Window(message='US Mobile login name/email', title='Login', dimensions=(250,24), default_text="*****@*****.**") r = w.run() user = r.text passwd = keyring.get_password("umma", user) if passwd is None: w = rumps.Window(message='US Mobile login password', title='Login', dimensions=(250, 24), default_text="Your password") r = w.run() passwd = r.text keyring.set_password("umma", user, passwd) with app.open('user', 'w') as f: f.write(user) return user, passwd
def run(self, nodes, args): for node in nodes: if not keyring.get_password(node.host, node.username): continue if args.yes or ask_confirm(u"Log out from {cluster} / {name} ({host})?".format(cluster=node.cluster.name, name=node.name, host=node.host)): keyring.delete_password(node.host, node.username)
def login(self): ''' Return 502 if connection error ''' loginHTML = requests.get(self.loginUrl) etmSearch = re.search(r'<input type="hidden" name="etm" id="etm" value="(.*?)".*?/>', loginHTML.text) etm = etmSearch.group(1) pieSearch = re.search(r'<input type="hidden" name="pie" id="pie" value="(.*?)".*?/>', loginHTML.text) pie = pieSearch.group(1) data = {'username': self.username, 'password': self.password, 'pie': pie, 'etm': etm } headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0'} try: loginHTML = requests.post(self.loginUrl, data=data, headers=headers) except: return "502" #print loginHTML.text tokenSearch = re.search(r'<input type="hidden" name="skypetoken" value="(.*?)".*?/>', loginHTML.text) self.token = tokenSearch.group(2) prefix = "%s_" % self.username keyring.set_password('messagesReceiver', prefix + 'skypeToken', self.token) #reset registrationToken if existed if keyring.get_password('messagesReceiver', prefix + 'skypeRegistrationToken') != None: keyring.delete_password('messagesReceiver', prefix + 'skypeRegistrationToken') print self.token
def clear_auth(appname=None, authfile=None, cookiejar=None): '''Clear all authentication data and delete related files''' appname = appname or APPNAME authfile = authfile or AUTHFILE cookiejar = cookiejar or COOKIEJAR authfiles = [cookiejar] log.info("Clearing all authentication data") if keyring: try: log.debug("Removing credentials from keyring") keyring.delete_password(appname, appname) except AttributeError as e: log.warning("Error removing keyring credentials. Outdated library? (%s)", e) else: authfiles.append(authfile) for auth in authfiles: try: log.debug("Deleting '%s'", auth) os.remove(auth) except OSError as e: log.debug(e) log.info("Finished clearing authentication")
def delete_pwd(pwd_entry_name): ''' Deletes password from an OS-specific keyring ''' if pwd_entry_name: pwd = keyring.get_password(pwd_entry_name, getpass.getuser()) if pwd: keyring.delete_password(pwd_entry_name, getpass.getuser())
def unlink(): print 'Unlinking account info...' try: delete_password('dropbox', app_key) print '...Done' except errors.PasswordDeleteError: print 'There is no account info to unlink'
def __delete_password(self, username): """ Delete the password associated to this username in keyring :param username: Username for the password :type username: str """ keyring.delete_password(self.keyring, username)
def remove_credentials(service, username): try: keyring.delete_password(service, username) logger.info("Credentials of user [%s] for service [%s] removed", username, service) except PasswordDeleteError as e: logger.error("Failed to remove credentials: %s", e) sys.exit(1)
def get_password(self, realm, username=None, interact=True, reset=False): section = self._find_section(realm) config_user_name = self._get_username(section) if not config_user_name or username != config_user_name: return Noner if not username: username = config_user_name try: if self.reset or reset: if username not in self.already_reset or reset: keyring.delete_password(make_realm(section), username) self.already_reset.append(username) password = keyring.get_password(make_realm(section), username) except: password = None if password is None and interact: prompt = "{}@{} Password: ".format(username, realm) password = self.password_cb(prompt) self.set_password( make_realm(section), username, password) return password
def forget(self): try: keyring.delete_password("kotnetcli", "gebruikersnaam") keyring.delete_password("kotnetcli", "wachtwoord") print "You have succesfully removed your kotnetcli credentials." except keyring.errors.PasswordDeleteError: print "You have already removed your kotnetcli credentials."
def delete_username(self, username): try: keyring.delete_password(self.KEYRING_ID, username) except: print("The username/password doesn't exist") return False return True
def storeCred(self, username, passw): self.setConf("username", username) if not passw: if keyring.get_password("jira", username): keyring.delete_password("jira", username) else: keyring.set_password("jira", username, passw)
def change_auth_token( ): if get_password('geverpad', 'oauth_token'): delete_password('geverpad', 'oauth_token') print "Found and deleted" else: oauth_token = _get_evernote_token(True) if oauth_token != "None": set_password('geverpad', 'oauth_token', oauth_token)
def clear_password_store(self): try: keyring.delete_password(self.KEYRING_APP_ID, self.USERNAME) print("Password removed from Keyring") except PasswordDeleteError: logging.error("Password cannot be deleted or already has been removed") sys.exit(0)
def set_keychain(journal_name, password): if password is None: try: keyring.delete_password('jrnl', journal_name) except: pass elif not TEST: keyring.set_password('jrnl', journal_name, password)
def read_config(args, appname=None, authfile=None): appname = appname or APPNAME authfile = authfile or AUTHFILE username = "" password = "" # read if keyring: log.debug("Reading credentials from keyring") try: username, password = ( keyring.get_password(appname, appname).split('\n') + ['\n'] )[:2] except AttributeError as e: # Check for old keyring format and migrate before throwing warning data = keyring.get_password(appname, '') if data: log.info("Migrating credentials to new keyring format") keyring.set_password(appname, appname, data) try: keyring.delete_password(appname, '') except AttributeError as e: log.warning("Error deleting old keyring. Outdated library? (%s)", e) else: log.warning("Credentials not found in keyring. First time usage?") except IOError as e: # keyring sometimes raises this log.error(e) else: log.debug("Reading credentials from '%s'" % authfile) try: with open(authfile, 'r') as fd: username, password = (fd.read().splitlines() + ['\n'])[:2] except IOError as e: if e.errno == 2: # No such file or directory log.warning("Credentials file not found. First time usage?") else: log.error(e) # save if args.username or args.password: log.info("Saving credentials") if keyring: keyring.set_password(appname, appname, '%s\n%s' % (args.username or username, args.password or password,)) else: try: with open(authfile, 'w') as fd: fd.write("%s\n%s\n" % (args.username or username, args.password or password,)) os.chmod(authfile, 0o600) except IOError as e: log.error(e) return dict(username=username, password=password,)
def clear_passwords(config, args, *extra, **kwargs): keyring.delete_password( 'taskwarrior_inthe.am', 'api_key', ) keyring.delete_password( 'taskwarrior_inthe.am', 'api_v2_key', )
def clear(target, username): target_list = lst(targets()) if target not in target_list: raise ValueError("%s must be one of %r" % (target, target_list)) if keyring.get_password(target, username): keyring.delete_password(target, username) print "Password cleared for %s, %s" % (target, username) else: print "No password found for %s, %s" % (target, username)
def password_delete(self, username, parameter): """ Deletes a password from the keychain for a particular environment and configuration parameter pair. """ try: keyring.delete_password('multistack', username) return True except: return False
def on_commit(self, update): for key, data in update.iteritems(): for k, v in data.iteritems(): if k in {"action", "table", "id"}: continue key = "{}_{}_{}".format(data["table"], data["id"], k) if data["action"] in {"new", "update"}: keyring.set_password(settings.keyring_service, key, data["password"] or "") elif data["action"] == "delete": keyring.delete_password(settings.keyring_service, key)
def clear_cached_token(self): """Clear any stored tokens. :raises: KeyError if failed to clear token. :rtype: None """ try: keyring.delete_password(self.cred_store, self.store_key) except keyring.errors.PasswordDeleteError: raise_with_traceback(KeyError, "Unable to clear token.")
def test__save_password_in_keyring(self): """ Test storing password in the keyring """ cloud._save_password_in_keyring( "salt.cloud.provider.test_case_provider", "fake_username", "fake_password_c8231" ) stored_pw = keyring.get_password("salt.cloud.provider.test_case_provider", "fake_username") keyring.delete_password("salt.cloud.provider.test_case_provider", "fake_username") self.assertEqual(stored_pw, "fake_password_c8231")
def test_save_and_load(self): keydict = {self.session.SESSION_ARG_KEYNAME: 'mock_key'} self.session.save_session(**keydict) session = od_api_session.OneDriveAPISession.load_session(**keydict) self.assertEqual(self.session.token_type, session.token_type) self.assertEqual(self.session.scope, session.scope) self.assertEqual(self.session.access_token, session.access_token) self.assertEqual(self.session.client_id, session.client_id) self.assertEqual(self.session.client_secret, session.client_secret) self.assertEqual(self.session.refresh_token, session.refresh_token) keyring.delete_password(od_api_session.OneDriveAPISession.KEYRING_SERVICE_NAME, 'mock_key')
def clear_password(self, widget): global webVPN try: keyring.delete_password(webVPN['url'], webVPN['realm'] + '\\' + webVPN['username']) # subprocess.Popen(['notify-send','-t','1000','Password cleaned.']) notification.update('webVPN', 'Saved password deleted.', 'edit-clear') notification.show() except keyring.errors.PasswordDeleteError: # subprocess.Popen(['notify-send','-t','1000','Password not saved.']) notification.update('webVPN', 'Password not saved.', 'emblem-unreadable') notification.show()
def email_failed(self,data): print 'Email failed!' self['email_page'].set_sensitive(True) self['email_page']['error_bar'].show() self['email_page']['error_bar']['error'].set_text(data['error']) try: #Not available in all versions of keyring keyring.delete_password(KEYRING_SERVICE_NAME,data['username']) #assume that the problem was a bad password except: #TODO: Better error handling here pass
def remove_user(self, user): del self.__users[user.alias] self.save() try: import keyring if keyring.get_password(GENESTACK_SDK, user.alias): keyring.delete_password(GENESTACK_SDK, user.alias) except ImportError: pass except Exception as e: print "Error while deleting user password for %s: %s" % (user.alias, e)
def expire_password(system, username): """ Deletes the password corresponding to the system and username. This will completely remove the password from the keyring :param unicode system: The name of the system that the password is for. Typically, this will be the cli tools name. It effectively acts as a namespace :param unicode username: The username that the password corresponds to :rtype: None """ LOG.debug('Expiring {0} password for user {1}'.format(system, username)) keyring.delete_password(system, username)
def reset_credentials(): import keyring from tutorlib.config.configuration import load_config, save_config cfg = load_config() try: keyring.delete_password(MPT_SERVICE, cfg.online.username) except Exception: # PasswordDeleteError isn't defined anywhere! pass cfg.online.username = '' save_config(cfg)
def clear_credentials(config=None): """Delete username and password from configuration file and from the keyring.""" if config is None: config = get_config() username = config.get("credentials", "username", fallback=None) if username: try: import keyring keyring.delete_password(_SCRIPT_NAME, username) except ImportError: pass config.remove_section("credentials") config.save()
def clean_token(): keyring.delete_password("trood/em", "active")
def delete_from_vault(application, user): try: keyring.delete_password(application, user) except PasswordDeleteError: pass
def delete_password(self, account): try: keyring.delete_password(self.identifier, account) except: pass # don't care - silently fail
def delete_mail_password(mail): try: keyring.delete_password(keyring_service(), mail_hash(mail)) except: pass
if save == "y" or save == "Y": keyring.set_password("system", "gradescope-email", email) keyring.set_password("system", "gradescope", password) else: pass br.form['session[email]'] = keyring.get_password("system", "gradescope-email") br.form['session[password]'] = keyring.get_password("system", "gradescope") req = br.submit() soup = BeautifulSoup(br.response().read(), features="html5lib") error = soup.find("div", class_="alert alert-flashMessage alert-error") if error is not None: print("Invalid email/password combination. Please try again") keyring.delete_password("system", "gradescope") keyring.delete_password("system", "gradescope-email") else: names = soup.find_all("h3", class_="courseBox--shortname") clases = dict() grades = {} missingAssignments = [] data = [] dataAssignments = [] testAssignments = [] file1 = open("report.txt", "w") jsFile = open("data.js", "w") for a in soup.find_all('a', href=True): h3 = a.find_all('h3', class_="courseBox--shortname") if len(h3) == 1:
def delete(self): keyring.delete_password(self.service, test_alias) keyring.delete_password(test_uid, 'pwd')
def test_other_platform(apikey_method): """Tests that the lib can connect to a different ODS platform with api key and custom url""" # shared info dataset_id = "employment-by-sector-in-france-and-the-united-states-1800-2012" base_url = "https://data.exchange.se.com/" test_apikey = os.environ['EXCH_AKEY'] # <-- travis # various methods to get the api key if apikey_method == 'direct': csv_str = get_whole_dataset(dataset_id=dataset_id, base_url=base_url, apikey=test_apikey) elif apikey_method == 'file_default': f_name = 'ods.apikey' assert not os.path.exists(f_name) with open(f_name, 'w+') as f: f.write(test_apikey) assert get_apikey(base_url=base_url) == test_apikey try: csv_str = get_whole_dataset(dataset_id=dataset_id, base_url=base_url) finally: os.remove(f_name) elif apikey_method == 'file_custom': f_name = 'tmp.tmp' assert not os.path.exists( f_name ), "File '%s' already exists, please delete it first" % f_name with open(f_name, 'w+') as f: f.write(test_apikey) assert get_apikey(base_url=base_url, apikey_filepath=f_name) == test_apikey try: csv_str = get_whole_dataset(dataset_id=dataset_id, base_url=base_url, apikey_filepath=f_name) finally: os.remove(f_name) elif apikey_method == 'single_env': os.environ['ODS_APIKEY'] = test_apikey assert get_apikey(base_url=base_url) == test_apikey csv_str = get_whole_dataset(dataset_id=dataset_id, base_url=base_url) del os.environ['ODS_APIKEY'] elif apikey_method == 'multi_env_baseurl': os.environ['ODS_APIKEY'] = "{'default': 'blah', '%s': '%s'}" % ( base_url, test_apikey) assert get_apikey(base_url=base_url) == test_apikey csv_str = get_whole_dataset(dataset_id=dataset_id, base_url=base_url) del os.environ['ODS_APIKEY'] elif apikey_method == 'multi_env_default': os.environ['ODS_APIKEY'] = "{'default': '%s', 'other_id': 'blah'}" % ( test_apikey) assert get_apikey(base_url=base_url) == test_apikey csv_str = get_whole_dataset(dataset_id=dataset_id, base_url=base_url) del os.environ['ODS_APIKEY'] elif apikey_method == 'keyring1': # if 'TRAVIS_PYTHON_VERSION' in os.environ: # pytest.skip("Does not work yet on travis") keyring.set_password(base_url, 'apikey', test_apikey) assert get_apikey(base_url=base_url, keyring_entries_username='******') == test_apikey csv_str = get_whole_dataset(dataset_id=dataset_id, base_url=base_url, keyring_entries_username='******') keyring.delete_password(base_url, 'apikey') assert keyring.get_password(base_url, 'apikey') is None elif apikey_method == 'keyring2': # if 'TRAVIS_PYTHON_VERSION' in os.environ: # pytest.skip("Does not work yet on travis") store_apikey_in_keyring(base_url=base_url, keyring_entries_username='******', apikey=test_apikey) assert get_apikey(base_url=base_url, keyring_entries_username='******') == test_apikey csv_str = get_whole_dataset(dataset_id=dataset_id, base_url=base_url, keyring_entries_username='******') remove_apikey_from_keyring(base_url=base_url, keyring_entries_username='******') assert keyring.get_password(base_url, 'apikey') is None else: raise ValueError('wrong apikey_method: %s' % apikey_method) ref_csv = """Year;France: Agriculture;France: Manufacturing;France: Services;USA: Agriculture;USA: Manufacturing;USA: Services 1950-12-31;31.5;33.3;35.2;13.5;33.2;50.3 1800-12-31;64.03737;21.58231;14.38032;68.42105;18.42105;13.15789 2012-12-31;2.9;20.9;76.2;1.6;18.3;80.1 1900-12-31;43.2;29.0;27.8;40.5;28.2;31.3 """ # move to pandas df = pd.read_csv(create_reading_buffer(csv_str, is_literal=False), sep=';') # compare with ref ref_df = pd.read_csv(create_reading_buffer(ref_csv, is_literal=True), sep=';') df = df.set_index('Year').sort_index() ref_df = ref_df.set_index('Year').sort_index() pd.testing.assert_frame_equal(df, ref_df) assert df.shape == (4, 6)
def log_out(self): keyring.delete_password('photini', self.name) self.close_connection()
def delete_password_in_keyring(username): return keyring.delete_password( KEYRING_SYSTEM, username, )
def deletePassword(self): keyring.delete_password(Constants.SERVICE_ID, self.username)
def on_delete_handler_account(model_class, instance): keyring.delete_password("PyMail", instance.address)
def delete_all_data(self): if (keyring.get_password(self._keyring_service, self._keyring_username) is not None): keyring.delete_password(self._keyring_service, self._keyring_username) self._load()
def delete_password_by_key(key): try: return keyring.delete_password('MavensMate: ' + key, key) except: #TODO: this has not been implemented in keyring yet :-( pass
def unset_key(key): keyring.delete_password(__title__, key)
def delete(self, key): keyring.delete_password(self.app.name, key)
def delete_password(section, host, username) -> bool: name = _make_password_name(section, host) return keyring.delete_password(name, username)
def remove_api_key(username): try: keyring.delete_password(SYNAPSE_CACHED_SESSION_APLICATION_NAME, username) except keyring_errors.PasswordDeleteError: # The API key does not exist, but that is fine pass
def delete(self, username: str) -> None: assert self.exists(username), 'Account does not exist' self._accounts.pop(username) keyring.delete_password(self.KEYRING_SERVICE_NAME, username)
def forget_password(self): if self.username is None: raise ValueError("forget_password: username is None") keyring.delete_password("fetch.py WAYF", self.username)
def deleteToken(self): try: keyring.delete_password(self._serviceName, 'token') except keyring.errors.PasswordDeleteError: pass
def __delattr__(self, item): try: keyring.delete_password(self.service_name, item) except Exception: log.exception("Failed to delete secret '%s' of '%r'.", item, self.service_name)
def __delete_secure__(self): keyring.delete_password(self.service, self.alias)
.format(user, Style.RESET_ALL)) exi = input('\n Enter any Key to Exit : ') elif (choice == 3): print() print('Please Enter the New Password') orig, p = get_pasword() vault_dict[server][user] = p sub_string = server + ',' + user for ele in range(len(server_details)): if sub_string in server_details[ele]: server_details[ele] = sub_string + ',' + p try: update_server_file(server_details) keyring.delete_password(server, user) keyring.set_password(server, user, orig) print(Fore.GREEN + "\n\t\t Password Updated Successfully " + Style.RESET_ALL) exi = input('\n Enter any Key to Exit : ') break except Exception: print() print( Fore.RED + ' Failed to Update the Password , Please try Again ' + Style.RESET_ALL) exi = input('\n Enter any Key to Exit : ') elif (choice == 4):
def delete_bgp_peer_password(bgp_peer_id): try: keyring.delete_password(NEUTRON_KEYRING_SERVICE, bgp_peer_id) except keyring.errors.PasswordDeleteError: pass # password likely not set
def delete_credentials(self): keyring.delete_password('plenty-identity', 'user') keyring.delete_password('plenty-identity', 'password')
def delete_key(): keyring.delete_password("pushbullet", "cli")
def attendance(roll): """ Get the credentials first """ password = keyring.get_password('ERP', roll) saved_password = True if password != None: response = attempt(roll, password) if not response: click.echo( click.style('Password modified, Enter new password.', fg='green', bold=True)) keyring.delete_password('ERP', roll) password = None if password == None: password = getpass.getpass("Password : "******"Subject Code", "Subject Name", "Attended", "Percentage" ] show_table(attendance_table, attendance_header) # Fetch missed classes from ERP and Pretty Print it on Terminal. ans = input("Do you want to see the missed class(es) date-wise ? (y/N) ") if ans == 'y': input_subject = [] specific_class_ans = input( "Do you want to see the missed class(es) of specific subject(s)? (y/N) " ) if specific_class_ans == 'y': input_subject = [ x for x in input( "Enter the Subject code(s) seperated by spaces: ").split() ] attendance = None cached_yes = False try: with open(os.path.expanduser("~/.attendance_past.txt"), "r") as f: attendance = [line.split("\t") for line in f] cached_yes = input( "Unless your past attendance was updated recently, would you like us to use cached data? (y/N) " ) except Exception: pass print("Please wait, it may take a while to fetch the information...") if attendance is not None and cached_yes == 'y': missed_class_response = MissedClassDates(roll, password, attendance[0][0]) else: missed_class_response = MissedClassDates(roll, password) if specific_class_ans != 'y': missed_class_table = make_missed_class_table( missed_class_response, attendance, cached_yes) else: missed_class_table = make_specific_sub_missed_class_table( missed_class_response, input_subject, attendance, cached_yes) Missed_class_headers = [ "Subject Code", "Date", "Subject Name", "Attended" ] show_table(missed_class_table, Missed_class_headers) # Store password locally if not saved already if not saved_password: ans = input("Do you want to store your password locally? (y/N) ") if ans == 'y': keyring.set_password('ERP', roll, password)
def read_config(args, appname=None, authfile=None): appname = appname or APPNAME authfile = authfile or AUTHFILE username = "" password = "" # read if keyring: log.debug("Reading credentials from keyring") try: username, password = ( keyring.get_password(appname, appname).split('\n') + ['\n'])[:2] except AttributeError as e: # Check for old keyring format and migrate before throwing warning data = keyring.get_password(appname, '') if data: log.info("Migrating credentials to new keyring format") keyring.set_password(appname, appname, data) try: keyring.delete_password(appname, '') except AttributeError as e: log.warning( "Error deleting old keyring. Outdated library? (%s)", e) else: log.warning( "Credentials not found in keyring. First time usage?") except IOError as e: # keyring sometimes raises this log.error(e) else: log.debug("Reading credentials from '%s'" % authfile) try: with open(authfile, 'r') as fd: username, password = (fd.read().splitlines() + ['\n'])[:2] except IOError as e: if e.errno == 2: # No such file or directory log.warning("Credentials file not found. First time usage?") else: log.error(e) # save if args.username or args.password: log.info("Saving credentials") if keyring: keyring.set_password( appname, appname, '%s\n%s' % ( args.username or username, args.password or password, )) else: try: with open(authfile, 'w') as fd: fd.write("%s\n%s\n" % ( args.username or username, args.password or password, )) os.chmod(authfile, 0o600) except IOError as e: log.error(e) return dict( username=username, password=password, )
from gi.repository import GdkPixbuf from gi.repository import Gtk from gi.repository import GLib from bcloud import Config from bcloud.log import logger from bcloud import net from bcloud import pcs from bcloud import util try: import keyring keyring_available = True try: keyring.set_password("test", "utest", "ptest") keyring.get_password("test", "utest") keyring.delete_password("test", "utest") except: keyring_available = False except (ImportError, ValueError): logger.warn(traceback.format_exc()) keyring_available = False DEFAULT_PROFILE = { 'window-size': (960, 680), 'use-status-icon': True, 'use-dark-theme': False, # 默认禁用深色主题 'display-avatar': True, # 是否显示用户头像 'use-notify': True, 'first-run': True, 'save-dir': Config.HOME_DIR, 'sync-dir': Config.HOME_DIR,
def delete(key): """Delete the key.""" try: keyring.delete_password(__name__, key) except Exception as e: click.echo((Exception, e))