diff options
author | Ben McGinnes <[email protected]> | 2018-03-30 03:12:42 +0000 |
---|---|---|
committer | Ben McGinnes <[email protected]> | 2018-03-30 03:12:42 +0000 |
commit | 6a527a640744990af582ffff4759591afefdbc9a (patch) | |
tree | c6e57372500286a2da9dddd446e0c0c5ed86f3b6 | |
parent | docs: python bindings howto (diff) | |
download | gpgme-6a527a640744990af582ffff4759591afefdbc9a.tar.gz gpgme-6a527a640744990af582ffff4759591afefdbc9a.zip |
script: groups work-around
* Updated script to match the methods in the HOWTO.
-rw-r--r-- | lang/python/examples/howto/groups.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lang/python/examples/howto/groups.py b/lang/python/examples/howto/groups.py index 5e7fdf60..c6f67d22 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: |