do not show traceback when adding existing determiistic key
This commit is contained in:
parent
7f4605998c
commit
94ba3e29d1
@ -20,7 +20,7 @@
|
||||
|
||||
import sys, getpass
|
||||
import logger, onionrexceptions
|
||||
from onionrutils import stringvalidators
|
||||
from onionrutils import stringvalidators, bytesconverter
|
||||
from onionrusers import onionrusers, contactmanager
|
||||
import unpaddedbase32
|
||||
def add_ID(o_inst):
|
||||
@ -45,9 +45,13 @@ def add_ID(o_inst):
|
||||
else:
|
||||
logger.error('Passwords do not match.', terminal=True)
|
||||
sys.exit(1)
|
||||
try:
|
||||
o_inst.onionrCore._crypto.keyManager.addKey(pubKey=newID,
|
||||
privKey=privKey)
|
||||
logger.info('Added ID: %s' % (o_inst.onionrUtils.bytesToStr(newID),), terminal=True)
|
||||
except ValueError:
|
||||
logger.error('That ID is already available, you can change to it with the change-id command.', terminal=True)
|
||||
return
|
||||
logger.info('Added ID: %s' % (bytesconverter.bytes_to_str(newID),), terminal=True)
|
||||
|
||||
def change_ID(o_inst):
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user