summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpkg/scripts/bootstrap_develop.sh3
-rw-r--r--src/leap/bitmask/backend/components.py14
-rw-r--r--src/leap/bitmask/pix.py26
3 files changed, 25 insertions, 18 deletions
diff --git a/pkg/scripts/bootstrap_develop.sh b/pkg/scripts/bootstrap_develop.sh
index 3695fabc..af3dce20 100755
--- a/pkg/scripts/bootstrap_develop.sh
+++ b/pkg/scripts/bootstrap_develop.sh
@@ -118,7 +118,8 @@ setup_develop() {
# hack to solve gnupg version problem
pip uninstall -y gnupg && pip install gnupg
- pip install -r pkg/requirements-pixelated.pip
+ # XXX this fails in trusty; see #8009
+ # pip install -r pkg/requirements-pixelated.pip
set +x
echo "${cc_green}Status: $status done.${cc_normal}"
}
diff --git a/src/leap/bitmask/backend/components.py b/src/leap/bitmask/backend/components.py
index 0f8864c3..0c2b3280 100644
--- a/src/leap/bitmask/backend/components.py
+++ b/src/leap/bitmask/backend/components.py
@@ -38,7 +38,7 @@ from leap.bitmask.crypto.srpauth import SRPAuth
from leap.bitmask.crypto.srpregister import SRPRegister
from leap.bitmask.logs.utils import get_logger
from leap.bitmask.platform_init import IS_LINUX
-from leap.bitmask.pix import start_pixelated_user_agent
+from leap.bitmask import pix
from leap.bitmask.provider.pinned import PinnedProviders
from leap.bitmask.provider.providerbootstrapper import ProviderBootstrapper
from leap.bitmask.services import get_supported
@@ -1088,13 +1088,15 @@ class Mail(object):
return threads.deferToThread(self._stop_imap_service)
def start_pixelated_service(self, full_user_id):
- reactor.callFromThread(
- start_pixelated_user_agent,
- full_user_id,
- self._soledad_proxy,
- self._keymanager_proxy)
+ if pix.HAS_PIXELATED:
+ reactor.callFromThread(
+ pix.start_pixelated_user_agent,
+ full_user_id,
+ self._soledad_proxy,
+ self._keymanager_proxy)
def stop_pixelated_service(self):
+ # TODO stop it, somehow
pass
diff --git a/src/leap/bitmask/pix.py b/src/leap/bitmask/pix.py
index 8242255c..a05a1d9c 100644
--- a/src/leap/bitmask/pix.py
+++ b/src/leap/bitmask/pix.py
@@ -27,17 +27,21 @@ from twisted.python import log
from leap.bitmask.util import get_path_prefix
from leap.mail.imap.account import IMAPAccount
-import pixelated_www
-
-from pixelated.adapter.mailstore import LeapMailStore
-from pixelated.adapter.welcome_mail import add_welcome_mail
-from pixelated.application import SingleUserServicesFactory
-from pixelated.application import UserAgentMode
-from pixelated.application import start_site
-from pixelated.bitmask_libraries.smtp import LeapSMTPConfig
-from pixelated.bitmask_libraries.session import SessionCache
-from pixelated.config import services
-from pixelated.resources.root_resource import RootResource
+try:
+ import pixelated_www
+
+ from pixelated.adapter.mailstore import LeapMailStore
+ from pixelated.adapter.welcome_mail import add_welcome_mail
+ from pixelated.application import SingleUserServicesFactory
+ from pixelated.application import UserAgentMode
+ from pixelated.application import start_site
+ from pixelated.bitmask_libraries.smtp import LeapSMTPConfig
+ from pixelated.bitmask_libraries.session import SessionCache
+ from pixelated.config import services
+ from pixelated.resources.root_resource import RootResource
+ HAS_PIXELATED = True
+except ImportError:
+ HAS_PIXELATED = False
def start_pixelated_user_agent(userid, soledad, keymanager):