From de11f557a8698976faa3b6cfcead6eb8c9e5384f Mon Sep 17 00:00:00 2001 From: Ben McGinnes Date: Fri, 30 Mar 2018 14:10:24 +1100 Subject: [PATCH] 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). --- lang/python/docs/GPGMEpythonHOWTOen.org | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lang/python/docs/GPGMEpythonHOWTOen.org b/lang/python/docs/GPGMEpythonHOWTOen.org index cb85b61b..e0a26642 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: