summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2015-09-21 23:15:33 +0200
committerRuben Pollan <meskio@sindominio.net>2015-09-21 23:15:33 +0200
commit6d823d4e94e70d19a31894f973754ff05d557493 (patch)
treebd3af060b9d6241623d3d12e354cb02c758e1b77
parent3b0e1694bc3280896a845d92f55590b1553c4a3f (diff)
[feat] more verbosity in get_key wrong address log
-rw-r--r--src/leap/keymanager/openpgp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/leap/keymanager/openpgp.py b/src/leap/keymanager/openpgp.py
index 794a0ec2..b8b47d02 100644
--- a/src/leap/keymanager/openpgp.py
+++ b/src/leap/keymanager/openpgp.py
@@ -321,7 +321,9 @@ class OpenPGPScheme(EncryptionScheme):
raise errors.KeyNotFound(address)
leap_assert(
address in doc.content[KEY_ADDRESS_KEY],
- 'Wrong address in key data.')
+ 'Wrong address in key %s. Expected %s, found %s.'
+ % (doc.content[KEY_ID_KEY], address,
+ doc.content[KEY_ADDRESS_KEY]))
key = build_key_from_dict(OpenPGPKey, doc.content)
key._gpgbinary = self._gpgbinary
return key