diff options
Diffstat (limited to 'lang/python/examples/howto/pmkey-import-hkp.py')
| -rwxr-xr-x | lang/python/examples/howto/pmkey-import-hkp.py | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/lang/python/examples/howto/pmkey-import-hkp.py b/lang/python/examples/howto/pmkey-import-hkp.py index 3b9345f4..1a11b4af 100755 --- a/lang/python/examples/howto/pmkey-import-hkp.py +++ b/lang/python/examples/howto/pmkey-import-hkp.py @@ -110,10 +110,16 @@ 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} -With UIDs wholely or partially matching the following string: +With UIDs wholely or partially matching the following string(s):          {1} @@ -125,7 +131,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)  | 
