summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/vpn/_checks.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/vpn/_checks.py')
-rw-r--r--src/leap/bitmask/vpn/_checks.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/leap/bitmask/vpn/_checks.py b/src/leap/bitmask/vpn/_checks.py
index c8f7dd36..9586d096 100644
--- a/src/leap/bitmask/vpn/_checks.py
+++ b/src/leap/bitmask/vpn/_checks.py
@@ -17,14 +17,19 @@ class ImproperlyConfigured(Exception):
pass
-def is_service_ready(provider):
+def get_failure_for(provider):
if not _has_valid_cert(provider):
raise ImproperlyConfigured('Missing VPN certificate')
-
if IS_LINUX and not is_pkexec_in_system():
- log.warn('System has no pkexec')
raise NoPkexecAvailable()
+
+def is_service_ready(provider):
+ if not _has_valid_cert(provider):
+ return False
+ if IS_LINUX and not is_pkexec_in_system():
+ log.warn('System has no pkexec')
+ return False
return True