script: groups.py
* Added check for if it is run on a Windows system so that the correct binary filename is invoked.
This commit is contained in:
parent
8dff414e17
commit
92cd060f5e
@ -24,6 +24,7 @@ from __future__ import absolute_import, division, unicode_literals
|
|||||||
# <http://www.gnu.org/licenses/>.
|
# <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Intended for use with other scripts.
|
Intended for use with other scripts.
|
||||||
@ -31,7 +32,12 @@ Intended for use with other scripts.
|
|||||||
Usage: from groups import group_lists
|
Usage: from groups import group_lists
|
||||||
"""
|
"""
|
||||||
|
|
||||||
lines = subprocess.getoutput("gpgconf --list-options gpg").splitlines()
|
if sys.platform == "win32":
|
||||||
|
gpgconfcmd = "gpgconf.exe --list-options gpg"
|
||||||
|
else:
|
||||||
|
gpgconfcmd = "gpgconf --list-options gpg"
|
||||||
|
|
||||||
|
lines = subprocess.getoutput(gpgconfcmd).splitlines()
|
||||||
|
|
||||||
for i in range(len(lines)):
|
for i in range(len(lines)):
|
||||||
if lines[i].startswith("group") is True:
|
if lines[i].startswith("group") is True:
|
||||||
|
Loading…
Reference in New Issue
Block a user