summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/core
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2016-09-20 16:45:53 +0200
committerRuben Pollan <meskio@sindominio.net>2016-09-20 18:53:19 +0200
commit607df76ebdf5516085835a0a1f7718baf966a6e0 (patch)
treeeea518e4f699f58600833971dafa77a3eb4bd42a /src/leap/bitmask/core
parenteebfd5ea79348b19fdd0c3010735580991c3cdd1 (diff)
[feat] discover gpg bin path instead of hardcode it
Diffstat (limited to 'src/leap/bitmask/core')
-rw-r--r--src/leap/bitmask/core/mail_services.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py
index ea53ee07..c0c986a4 100644
--- a/src/leap/bitmask/core/mail_services.py
+++ b/src/leap/bitmask/core/mail_services.py
@@ -30,6 +30,7 @@ from collections import namedtuple
from twisted.application import service
from twisted.internet import defer
from twisted.python import log
+from twisted.python.procutils import which
# TODO move to bitmask.common
from leap.common.service_hooks import HookableService
@@ -43,6 +44,7 @@ from leap.bitmask.mail.imap.service import imap
from leap.bitmask.mail.incoming.service import IncomingMail
from leap.bitmask.mail.incoming.service import INCOMING_CHECK_PERIOD
from leap.bitmask.mail import smtp
+from leap.bitmask.util import get_gpg_bin_path
from leap.soledad.client.api import Soledad
from leap.bitmask.core.uuid_map import UserMap
@@ -282,15 +284,11 @@ class KeymanagerContainer(Container):
km_args = (userid, nickserver_uri, soledad)
- # TODO use the method in
- # services.soledadbootstrapper._get_gpg_bin_path.
- # That should probably live in keymanager package.
-
km_kwargs = {
"token": token, "uid": uuid,
"api_uri": api_uri, "api_version": "1",
"ca_cert_path": cert_path,
- "gpgbinary": "/usr/bin/gpg"
+ "gpgbinary": get_gpg_bin_path()
}
keymanager = KeyManager(*km_args, **km_kwargs)
return keymanager