[git] GPGME - branch, master, updated. gpgme-1.12.0-100-gad03023

by Ben McGinnes cvs at cvs.gnupg.org
Wed Dec 5 15:55:20 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  ad030234b4b50f1152731a17c54a53be2f2e0c25 (commit)
       via  dc5600d306f808767068bad5117232fc3d35ac43 (commit)
      from  65c28da4e49a8778607fdcf6f51a840166616d9f (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 ad030234b4b50f1152731a17c54a53be2f2e0c25
Merge: dc5600d 65c28da
Author: Ben McGinnes <ben at adversary.org>
Date:   Thu Dec 6 01:53:08 2018 +1100

    Merge branch 'master' of ssh+git://playfair.gnupg.org/git/gpgme


commit dc5600d306f808767068bad5117232fc3d35ac43
Author: Ben McGinnes <ben at adversary.org>
Date:   Thu Dec 6 01:50:52 2018 +1100

    python: examples
    
    * cut some of then poor len usage.

diff --git a/lang/python/examples/howto/add-userid.py b/lang/python/examples/howto/add-userid.py
index 85b90de..945a809 100755
--- a/lang/python/examples/howto/add-userid.py
+++ b/lang/python/examples/howto/add-userid.py
@@ -53,7 +53,7 @@ else:
 
 fpr = "".join(fpr0.split())
 
-if len(uid_cmnt) > 0:
+if uid_cmnt:
     userid = "{0} ({1}) <{2}>".format(uid_name, uid_cmnt, uid_email)
 else:
     userid = "{0} <{2}>".format(uid_name, uid_email)
diff --git a/lang/python/examples/howto/create-key.py b/lang/python/examples/howto/create-key.py
index f7da206..9058c19 100755
--- a/lang/python/examples/howto/create-key.py
+++ b/lang/python/examples/howto/create-key.py
@@ -52,7 +52,7 @@ elif os.path.exists(homedir) is True:
 else:
     pass
 
-if len(uid_cmnt) > 0:
+if uid_cmnt:
     userid = "{0} ({1}) <{2}>".format(uid_name, uid_cmnt, uid_email)
 else:
     userid = "{0} <{2}>".format(uid_name, uid_email)
diff --git a/lang/python/examples/howto/revoke-userid.py b/lang/python/examples/howto/revoke-userid.py
index ac5f649..da84ad1 100755
--- a/lang/python/examples/howto/revoke-userid.py
+++ b/lang/python/examples/howto/revoke-userid.py
@@ -53,7 +53,7 @@ else:
 
 fpr = "".join(fpr0.split())
 
-if len(uid_cmnt) > 0:
+if uid_cmnt:
     userid = "{0} ({1}) <{2}>".format(uid_name, uid_cmnt, uid_email)
 else:
     userid = "{0} <{2}>".format(uid_name, uid_email)
diff --git a/lang/python/examples/howto/send-key-to-keyserver.py b/lang/python/examples/howto/send-key-to-keyserver.py
index d72ca9f..cb17e80 100755
--- a/lang/python/examples/howto/send-key-to-keyserver.py
+++ b/lang/python/examples/howto/send-key-to-keyserver.py
@@ -49,7 +49,7 @@ else:
     logrus = input("Enter the UID matching the key(s) to export: ")
     homedir = input("Enter the GPG configuration directory path (optional): ")
 
-if len(homedir) == 0:
+if not homedir:
     homedir = None
 elif homedir.startswith("~"):
     userdir = os.path.expanduser(homedir)
@@ -73,7 +73,7 @@ if homedir is not None:
 else:
     pass
 
-if len(logrus) > 0:
+if logrus:
     try:
         export_result = c.key_export(pattern=logrus)
     except Exception as e:
diff --git a/lang/python/examples/howto/sign-key.py b/lang/python/examples/howto/sign-key.py
index 55d517b..f9c90d7 100755
--- a/lang/python/examples/howto/sign-key.py
+++ b/lang/python/examples/howto/sign-key.py
@@ -53,11 +53,11 @@ else:
 fpr = "".join(fpr0.split())
 key = c.get_key(fpr, secret=False)
 
-if len(userid) > 0 and sig_type.lower() == "local":
+if userid and sig_type.lower() == "local":
     c.key_sign(key, uids=userid, local=True)
-elif len(userid) > 0 and sig_type.lower() != "local":
+elif userid and sig_type.lower() != "local":
     c.key_sign(key, uids=userid)
-elif len(userid) == 0 and sig_type.lower() == "local":
+elif not userid and sig_type.lower() == "local":
     c.key_sign(key, local=True)
 else:
     c.key_sign(key)

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

Summary of changes:
 lang/python/examples/howto/add-userid.py            | 2 +-
 lang/python/examples/howto/create-key.py            | 2 +-
 lang/python/examples/howto/revoke-userid.py         | 2 +-
 lang/python/examples/howto/send-key-to-keyserver.py | 4 ++--
 lang/python/examples/howto/sign-key.py              | 6 +++---
 5 files changed, 8 insertions(+), 8 deletions(-)


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




More information about the Gnupg-commits mailing list