aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/examples/howto/pmkey-import-hkp-alt.py
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python/examples/howto/pmkey-import-hkp-alt.py')
-rwxr-xr-xlang/python/examples/howto/pmkey-import-hkp-alt.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lang/python/examples/howto/pmkey-import-hkp-alt.py b/lang/python/examples/howto/pmkey-import-hkp-alt.py
index 859de03b..9d6bb5ef 100755
--- a/lang/python/examples/howto/pmkey-import-hkp-alt.py
+++ b/lang/python/examples/howto/pmkey-import-hkp-alt.py
@@ -147,6 +147,12 @@ for result in results:
new_uids = result.new_user_ids
new_scrt = result.secret_imported
nochange = result.unchanged
+
+ def knom():
+ for ki in result.imports:
+ for ku in c.get_key(ki.fpr).uids:
+ return ku.uid
+
print("""
The total number of keys considered for import was: {0}
@@ -162,7 +168,7 @@ Number of new secret keys: {6}
Number of unchanged keys: {7}
The key IDs for all considered keys were:
-""".format(num_keys, k, new_revs, new_sigs, new_subs, new_uids, new_scrt,
+""".format(num_keys, knom(), new_revs, new_sigs, new_subs, new_uids, new_scrt,
nochange))
for i in range(num_keys):
print(result.imports[i].fpr)