From 45947832d5b5918bfbfefc64f20fa4d93ad6c7a1 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 9 Jan 2018 18:21:37 +0100 Subject: [bug] do not depend on function if not in scope --- src/leap/bitmask/core/mail_services.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/leap/bitmask') diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py index bafd8803..99f43987 100644 --- a/src/leap/bitmask/core/mail_services.py +++ b/src/leap/bitmask/core/mail_services.py @@ -930,12 +930,14 @@ def _get_config_for_service(service, basedir, provider): return config -def _pick_server(config, strategy=first): +def _pick_server(config, strategy=None): """ Picks a server from a list of possible choices. The service files have a . - This implementation just picks the FIRST available server. + The default implementation just picks the FIRST available server. """ + if strategy is None: + strategy = first servers = config['hosts'].keys() choice = config['hosts'][strategy(servers)] return choice -- cgit v1.2.3