summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend/components.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-04-04 21:55:06 -0400
committerKali Kaneko <kali@leap.se>2016-04-04 21:55:06 -0400
commit0ce1c02dd59df3e4f23ba0b90e67644258412533 (patch)
treecd7ac64b812d3009c8ca20db97a4e4dca6394431 /src/leap/bitmask/backend/components.py
parentfe96e2eef29a538b856f0d8b4bbf3940e42364c1 (diff)
[bug] fail gracefully if no pixelated modules present
currently, we're distributing the wheels for the pixelated modules under downloads.leap.se. bootstrap script tried to download the pixelated modules, but it fails on python versions < 2.7.9, apparently. as a workaround, I make the import of the pixelated modules a non-fatal error by setting a flag, and doing the launching of the pix UA conditional on a successful import. - Related: #8009
Diffstat (limited to 'src/leap/bitmask/backend/components.py')
-rw-r--r--src/leap/bitmask/backend/components.py14
1 files changed, 8 insertions, 6 deletions
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