summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-01-23 20:23:06 +0100
committerKali Kaneko <kali@leap.se>2018-01-25 01:19:21 +0100
commit26d3badc31655e2258f54dbcaf0bdca5f8623e69 (patch)
tree95f563b580989216426f05fdce2d2742b7fe4c41 /src
parentb3e9efc82a04cd0f896b38dbe155a4191db393e5 (diff)
[bug] fixed function call
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/bonafide/config.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/leap/bitmask/bonafide/config.py b/src/leap/bitmask/bonafide/config.py
index fe40f277..2ffa8738 100644
--- a/src/leap/bitmask/bonafide/config.py
+++ b/src/leap/bitmask/bonafide/config.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# config.py
-# Copyright (C) 2015 LEAP
+# Copyright (C) 2015-2018 LEAP
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -54,6 +54,9 @@ if platform.system() == 'Windows':
else:
ENDPOINT = "ipc:///tmp/%s.sock" % APPNAME
+SERVICE = 'service'
+ALLOW_ANONYMOUS = 'allow_anonymous'
+
def get_path_prefix(standalone=False):
return common_get_path_prefix(standalone)
@@ -268,7 +271,7 @@ class Provider(object):
self.log.debug('Bootstrapping provider %s' % domain)
def first_bootstrap_done(ignored):
- if self._allows_anonymous:
+ if self._allows_anonymous():
# we continue bootstrapping, we do not
# need to wait for authentication.
return
@@ -289,9 +292,9 @@ class Provider(object):
self.ongoing_bootstrap = d
def _allows_anonymous(self):
+ config = self.config()
try:
- anon = self._provider_config.get(
- 'service').get('allows_anonymous')
+ anon = config.get(SERVICE).get(ALLOW_ANONYMOUS, False)
except ValueError:
anon = False
return anon