From 26d3badc31655e2258f54dbcaf0bdca5f8623e69 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 23 Jan 2018 20:23:06 +0100 Subject: [bug] fixed function call --- src/leap/bitmask/bonafide/config.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') 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 -- cgit v1.2.3