[git] GPGME - branch, master, updated. gpgme-1.12.0-46-g0cb625d

by Ben McGinnes cvs at cvs.gnupg.org
Tue Nov 6 04:59:22 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  0cb625da84d7e5deeacad113c404a8bc2154c8e7 (commit)
      from  1b9d30db089e9de3ef859195ad58d2164a0231a0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0cb625da84d7e5deeacad113c404a8bc2154c8e7
Author: Ben McGinnes <ben at adversary.org>
Date:   Tue Nov 6 14:58:15 2018 +1100

    python examples: another importer
    
    * Fixed a similar type of bug with the non-protonmail importer.

diff --git a/lang/python/examples/howto/import-keys-hkp.py b/lang/python/examples/howto/import-keys-hkp.py
index 7d873ca..e619524 100755
--- a/lang/python/examples/howto/import-keys-hkp.py
+++ b/lang/python/examples/howto/import-keys-hkp.py
@@ -45,7 +45,10 @@ else:
 
 try:
     keys = server.search(pattern)
-    print("Found {0} key(s).".format(len(keys)))
+    if keys is not None:
+        print("Found {0} key(s).".format(len(keys)))
+    else:
+        pass
 except Exception as e:
     keys = []
     for logrus in pattern.split():
@@ -56,9 +59,10 @@ except Exception as e:
         keys.append(key[0])
     print("Found {0} key(s).".format(len(keys)))
 
-for key in keys:
-    import_result = c.key_import(key.key_blob)
-    results.append(import_result)
+if keys is not None:
+    for key in keys:
+        import_result = c.key_import(key.key_blob)
+        results.append(import_result)
 
 for result in results:
     if result is not None and hasattr(result, "considered") is False:

-----------------------------------------------------------------------

Summary of changes:
 lang/python/examples/howto/import-keys-hkp.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list