gpg: detect installed GnuPG binary

This commit is contained in:
Roman Zeyde
2017-10-07 20:43:59 +03:00
parent b7743e12a5
commit 377af1466c
2 changed files with 3 additions and 2 deletions

View File

@@ -179,7 +179,7 @@ def get_gnupg_binary(sp=subprocess):
"""Starting GnuPG 2.2.x, the default installation uses `gpg`."""
for cmd in ['gpg2', 'gpg']:
try:
return sp.check_output(args=['which', cmd]).strip()
return sp.check_output(args=['which', cmd]).strip().decode('ascii')
except subprocess.CalledProcessError:
log.debug('%r not found', cmd)
continue