[git] GPGME - branch, ben/howto-update-03, created. gpgme-1.10.0-184-g6a527a6

by Ben McGinnes cvs at cvs.gnupg.org
Fri Mar 30 05:14:14 CEST 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, ben/howto-update-03 has been created
        at  6a527a640744990af582ffff4759591afefdbc9a (commit)

- Log -----------------------------------------------------------------
commit 6a527a640744990af582ffff4759591afefdbc9a
Author: Ben McGinnes <ben at adversary.org>
Date:   Fri Mar 30 14:12:42 2018 +1100

    script: groups work-around
    
    * Updated script to match the methods in the HOWTO.

diff --git a/lang/python/examples/howto/groups.py b/lang/python/examples/howto/groups.py
index 5e7fdf6..c6f67d2 100644
--- a/lang/python/examples/howto/groups.py
+++ b/lang/python/examples/howto/groups.py
@@ -23,6 +23,7 @@ from __future__ import absolute_import, division, unicode_literals
 # Lesser General Public along with this program; if not, see
 # <http://www.gnu.org/licenses/>.
 
+import gpg
 import subprocess
 
 """
@@ -31,7 +32,9 @@ Intended for use with other scripts.
 Usage: from groups import group_lists
 """
 
-lines = subprocess.getoutput("gpgconf --list-options gpg").splitlines()
+gpgconf = gpg.core.get_engine_info()[2].file_name
+gpgconf_cmd "{0} --list-options gpg".format(gpgconf)
+lines = subprocess.getoutput(gpgconf_cmd).splitlines()
 
 for i in range(len(lines)):
     if lines[i].startswith("group") is True:

commit de11f557a8698976faa3b6cfcead6eb8c9e5384f
Author: Ben McGinnes <ben at adversary.org>
Date:   Fri Mar 30 14:10:24 2018 +1100

    docs: python bindings howto
    
    * Updated groups work around example to make sure it uses the correct
      version of gpgconf for the user invoking it (determined by the
      engine info).

diff --git a/lang/python/docs/GPGMEpythonHOWTOen.org b/lang/python/docs/GPGMEpythonHOWTOen.org
index cb85b61..e0a2664 100644
--- a/lang/python/docs/GPGMEpythonHOWTOen.org
+++ b/lang/python/docs/GPGMEpythonHOWTOen.org
@@ -1334,9 +1334,12 @@
    this information in Python.
 
    #+begin_src python
+     import gpg
      import subprocess
 
-     lines = subprocess.getoutput("gpgconf --list-options gpg").splitlines()
+     gpgconf = gpg.core.get_engine_info()[2].file_name
+     gpgconf_cmd "{0} --list-options gpg".format(gpgconf)
+     lines = subprocess.getoutput(gpgconf_cmd).splitlines()
 
      for i in range(len(lines)):
 	 if lines[i].startswith("group") is True:

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


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




More information about the Gnupg-commits mailing list