diff options
author | Kali Kaneko <kali@leap.se> | 2013-10-03 10:10:57 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2013-10-03 10:10:57 -0400 |
commit | 3597f2f043cbe78bb0c7dbc0be4778e2fe9cdd3f (patch) | |
tree | e45ec452a0f43cc7eebde01823521b9eab2c06b6 /src/leap/bitmask/services/soledad/soledadbootstrapper.py | |
parent | d4192fce8317372869005ce2b5c455d10763e058 (diff) | |
parent | b9b7b244984111ec799675dc90073396481e6173 (diff) |
Merge remote-tracking branch 'chiiph/bug/choose_one_gnupg' into develop
Diffstat (limited to 'src/leap/bitmask/services/soledad/soledadbootstrapper.py')
-rw-r--r-- | src/leap/bitmask/services/soledad/soledadbootstrapper.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/leap/bitmask/services/soledad/soledadbootstrapper.py b/src/leap/bitmask/services/soledad/soledadbootstrapper.py index 6731cc84..7968dd6a 100644 --- a/src/leap/bitmask/services/soledad/soledadbootstrapper.py +++ b/src/leap/bitmask/services/soledad/soledadbootstrapper.py @@ -321,7 +321,18 @@ class SoledadBootstrapper(AbstractBootstrapper): gpgbin = os.path.join( get_path_prefix(), "..", "apps", "mail", "gpg") else: - gpgbin = which("gpg") + try: + gpgbin_options = which("gpg") + # gnupg checks that the path to the binary is not a + # 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 + break + except IndexError as e: + logger.debug("Couldn't find the gpg binary!") + logger.exception(e) leap_check(gpgbin is not None, "Could not find gpg binary") return gpgbin |