summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/pyinst/anonvpn.spec2
-rw-r--r--src/leap/bitmask/core/service.py10
2 files changed, 8 insertions, 4 deletions
diff --git a/pkg/pyinst/anonvpn.spec b/pkg/pyinst/anonvpn.spec
index 3f5e18da..0748fc09 100644
--- a/pkg/pyinst/anonvpn.spec
+++ b/pkg/pyinst/anonvpn.spec
@@ -31,7 +31,7 @@ a = Analysis(ENTRYPOINT,
hiddenimports=hiddenimports,
hookspath=[],
runtime_hooks=[],
- excludes=excludes,
+ excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
diff --git a/src/leap/bitmask/core/service.py b/src/leap/bitmask/core/service.py
index 026e51d9..c3672843 100644
--- a/src/leap/bitmask/core/service.py
+++ b/src/leap/bitmask/core/service.py
@@ -46,7 +46,11 @@ except ImportError as exc:
backend = flags.BACKEND
if backend == 'default':
- from leap.bitmask.core import mail_services
+ try:
+ from leap.bitmask.core import mail_services
+ HAS_MAIL = True
+ except ImportError:
+ HAS_MAIL = False
from leap.bitmask.bonafide.service import BonafideService
elif backend == 'dummy':
from leap.bitmask.core.dummy import mail_services
@@ -98,10 +102,10 @@ class BitmaskBackend(configurable.ConfigurableService):
on_start(self.init_bonafide)
on_start(self.init_sessions)
- if self._enabled('mail'):
+ if HAS_MAIL and self._enabled('mail'):
on_start(self._init_mail_services)
- if self._enabled('vpn'):
+ if HAS_VPN and self._enabled('vpn'):
on_start(self._init_vpn)
if self._enabled('zmq'):