[Nym3-commit] r343 - trunk/nymbaron/Client
jr at conuropsis.org
jr at conuropsis.org
Wed Oct 12 23:13:43 CEST 2005
Author: jr
Date: 2005-10-12 23:13:43 +0200 (Wed, 12 Oct 2005)
New Revision: 343
Modified:
trunk/nymbaron/Client/Main.py
Log:
- Delete ask only once for the passphrase
Modified: trunk/nymbaron/Client/Main.py
===================================================================
--- trunk/nymbaron/Client/Main.py 2005-10-12 20:29:09 UTC (rev 342)
+++ trunk/nymbaron/Client/Main.py 2005-10-12 21:13:43 UTC (rev 343)
@@ -469,8 +469,8 @@
account = get_account_from_nickname(ui, config, nickname,
"No nickname given, abort\nUse -n <nickname>")
delmsg = Message.Delete()
+ secring = decode_secring(config, ui)
try:
- secring = decode_secring(config, ui)
midlist = decode_message_references(midlist, ['syn'],
{'syn': (build_syn_index, (secring, account))})
except DecodeException, inst:
@@ -479,16 +479,6 @@
#if the midlist is empty, do nothing
if not midlist: return
delmsg.fromData(midlist)
- try:
- secring = Keyring.Keyring(config.secring_path)
- ui.display("You need to provide your passphrase to unlock your keyring")
- while True:
- passphrase1 = ui.prompthidden("Passphrase")
- if secring.decrypt(passphrase1): break
- ui.display("wrong passphrase")
- except Keyring.NewKeyring:
- # The Keyring is new. That shouldn't happen
- raise Exception('Bug keyring?')
idKey = _cr.pk_decode_private_key(secring.get_key(account['idKey']))
account.sendControl([delmsg], idKey, "delete messages")
More information about the Nym3-commit
mailing list