summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-10-07 10:20:56 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-10-07 10:22:39 -0400
commit026cdb7d1c85a1ea0ff7a53a2c0a6c2465ec3711 (patch)
treebad68c98b65be143f1b721a605b090f8ed229bc8 /src
parent7edd1fcaed438a0566d37386ce8604f2565b4e6e (diff)
[bug] add path extension to gpg1 too
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/util.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/leap/bitmask/util.py b/src/leap/bitmask/util.py
index 2cea7d90..0b33c4eb 100644
--- a/src/leap/bitmask/util.py
+++ b/src/leap/bitmask/util.py
@@ -66,8 +66,12 @@ def get_gpg_bin_path():
# symlink, so we need to filter those and come up with
# just one option.
for opt in gpgbin_options:
- if not os.path.islink(opt):
- gpgbin = opt
+ # dereference a symlink, but will fail because
+ # no complete gpg2 support at the moment
+ # path = os.readlink(opt)
+ path = opt
+ if os.path.exists(path) and not os.path.islink(path):
+ gpgbin = path
break
except IndexError as e:
logger.debug("couldn't find the gpg binary!: %s" % (e,))
@@ -82,7 +86,7 @@ def get_gpg_bin_path():
# binary, in case it was renamed using dpkg-divert or manually.
# We could just pick gpg2, but we need to solve #7564 first.
try:
- gpgbin_options = which("gpg1")
+ gpgbin_options = which("gpg1", path_extension='/usr/bin')
for opt in gpgbin_options:
if not os.path.islink(opt):
gpgbin = opt
@@ -91,5 +95,5 @@ def get_gpg_bin_path():
logger.debug("couldn't find the gpg1 binary!: %s" % (e,))
if gpgbin is None:
- log.msg("Could not find gpg1 binary")
+ logger.debug("Could not find gpg1 binary")
return gpgbin