diff options
author | Kali Kaneko <kali@leap.se> | 2018-01-09 18:21:37 +0100 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2018-01-09 18:21:37 +0100 |
commit | 45947832d5b5918bfbfefc64f20fa4d93ad6c7a1 (patch) | |
tree | 0afb3744ce3220819c332c88f91d492df7ce3f7f /src/leap | |
parent | 23abf0145fccd2e9944efb3b91a8f5d9de5c93d5 (diff) |
[bug] do not depend on function if not in scope
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/bitmask/core/mail_services.py | 6 |
1 files changed, 4 insertions, 2 deletions
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 <describe>. - 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 |