[Nym3-commit] r319 - trunk/nymbaron/Client
jr at conuropsis.org
jr at conuropsis.org
Thu Oct 6 19:15:10 CEST 2005
Author: jr
Date: 2005-10-06 19:15:10 +0200 (Thu, 06 Oct 2005)
New Revision: 319
Modified:
trunk/nymbaron/Client/Main.py
Log:
- avoid entering the nymbaron passphrase twice
Modified: trunk/nymbaron/Client/Main.py
===================================================================
--- trunk/nymbaron/Client/Main.py 2005-10-06 17:00:51 UTC (rev 318)
+++ trunk/nymbaron/Client/Main.py 2005-10-06 17:15:10 UTC (rev 319)
@@ -165,11 +165,11 @@
mbox, index = account.get_mbox()
return dict([(str(i), j) for (i, j) in enumerate(index)])
-def build_journal_index(ui, config, account):
+def build_journal_index(ui, config, secring, account):
"""Builds the index of the journal of the given account. Returns a hash
- containing the correspondance index -> seqno, index as a str"""
+ containing the correspondance index -> seqno, index as a str. secring must
+ be decrypted"""
journal = account.get_journal()
- secring = decode_secring(config, ui)
key = secring.get_key(account['admKey'])
l = []
for seqno in journal.keys():
@@ -505,20 +505,19 @@
account.sendControl([getmsg], idKey)
def resend_command(ui, config, nickname = None, seqnolist = None):
- #TODO avoid the double input of passwd (in build_journal_index and
- #decode_secring)
account = get_account_from_nickname(ui, config, nickname,
"No nickname given, abort\nUse -n <nickname>")
+ secring = decode_secring(config, ui)
try:
#TODO ! this works only because seqNoLength == midLength
#modify the sugnature of decode message to take the length of
#the items to decode as an argument?
seqnolist = decode_message_references(seqnolist, ['journal'],
- {'journal': (build_journal_index, (ui, config, account))})
+ {'journal': (build_journal_index,
+ (ui, config, secring, account))})
except DecodeException, inst:
ui.display(str(inst))
sys.exit(1)
- secring = decode_secring(config, ui)
key = secring.get_key(account['admKey'])
journal = account.get_journal()
for seqno in seqnolist:
More information about the Nym3-commit
mailing list