[Nym3-commit] r352 - trunk/nymbaron/Client
jr at conuropsis.org
jr at conuropsis.org
Fri Oct 14 21:37:31 CEST 2005
Author: jr
Date: 2005-10-14 21:37:30 +0200 (Fri, 14 Oct 2005)
New Revision: 352
Modified:
trunk/nymbaron/Client/Main.py
Log:
- remove useless exception handling
Modified: trunk/nymbaron/Client/Main.py
===================================================================
--- trunk/nymbaron/Client/Main.py 2005-10-14 19:35:08 UTC (rev 351)
+++ trunk/nymbaron/Client/Main.py 2005-10-14 19:37:30 UTC (rev 352)
@@ -289,11 +289,7 @@
# the user
elif (com.ct() == SToCCODE['Summary']):
# We need to decrypt the set of synopsis to retrieve the MIDs
- try:
- secring = decode_secring(config, ui)
- except Keyring.NewKeyring:
- # The Keyring is new. That shouldn't happen
- raise Exception('Bug keyring?')
+ secring = decode_secring(config, ui)
clear = decipher_string(com.synSet, secring, account['encKeys'])
if not clear:
ui.display("Could not decrypt synopsis")
@@ -434,11 +430,7 @@
rt, ri, lh = exAdr.getRouting()
relayc = Message.Relay()
relayc.fromData(Message.intToStrBE(rt, 2), ri, body)
- try:
- secring = decode_secring(config, ui)
- except Keyring.NewKeyring:
- # The Keyring is new. That shouldn't happen
- raise Exception('Bug keyring?')
+ secring = decode_secring(config, ui)
idKey = _cr.pk_decode_private_key(secring.get_key(account['idKey']))
account.sendControl([relayc], idKey, "send an email")
@@ -469,11 +461,7 @@
older = chr(0) * 20
summ = Message.Summarize()
summ.fromData(max, older)
- try:
- secring = decode_secring(config, ui)
- except Keyring.NewKeyring:
- # The Keyring is new. That shouldn't happen
- raise Exception('Bug keyring?')
+ secring = decode_secring(config, ui)
idKey = _cr.pk_decode_private_key(secring.get_key(account['idKey']))
account.sendControl([summ], idKey, "request summaries")
@@ -540,11 +528,7 @@
if not number: number = config.nb_surb
account = get_account_from_nickname(ui, config, nickname,
"No nickname given, abort\nUse -n <nickname>")
- try:
- secring = decode_secring(config, ui)
- except Keyring.NewKeyring:
- # The Keyring is new. That shouldn't happen
- raise Exception('Bug keyring?')
+ secring = decode_secring(config, ui)
idKey = _cr.pk_decode_private_key(secring.get_key(account['idKey']))
surbc = Message.Surb()
surbc.fromData(account.generateSurbs(number))
More information about the Nym3-commit
mailing list