From 6a527a640744990af582ffff4759591afefdbc9a Mon Sep 17 00:00:00 2001 From: Ben McGinnes Date: Fri, 30 Mar 2018 14:12:42 +1100 Subject: [PATCH] script: groups work-around * Updated script to match the methods in the HOWTO. --- lang/python/examples/howto/groups.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 # . +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: