Skip to content
Snippets Groups Projects
Commit f62befe4 authored by Moul's avatar Moul
Browse files

[fix] #189: id: handle identity_of()’s exceptions

parent 45e0602e
No related branches found
No related tags found
No related merge requests found
...@@ -159,11 +159,11 @@ def date_approximation(block_id, time_first_block, avgentime): ...@@ -159,11 +159,11 @@ def date_approximation(block_id, time_first_block, avgentime):
async def id_pubkey_correspondence(id_pubkey): async def id_pubkey_correspondence(id_pubkey):
client = ClientInstance().client client = ClientInstance().client
if check_public_key(id_pubkey, False): if check_public_key(id_pubkey, False):
print( try:
"{} public key corresponds to identity: {}".format( idty = await identity_of(id_pubkey)
id_pubkey, await identity_of(id_pubkey) print("{} public key corresponds to identity: {}".format(id_pubkey, idty["uid"]))
) except:
) message_exit("No matching identity")
else: else:
pubkeys = await wot_lookup(id_pubkey) pubkeys = await wot_lookup(id_pubkey)
print("Public keys found matching '{}':\n".format(id_pubkey)) print("Public keys found matching '{}':\n".format(id_pubkey))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment