From b5b2e7e097f9dbe00c5db75a74bd09989b45e470 Mon Sep 17 00:00:00 2001 From: alex-zel Date: Thu, 27 Oct 2016 09:27:33 +0300 Subject: [PATCH] Remove trailing whitespaces Remove trailing whitespaces, change line 345 from 'if' to 'elif' --- salt/auth/ldap.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/salt/auth/ldap.py b/salt/auth/ldap.py index e11c10e2ad..183f1539de 100644 --- a/salt/auth/ldap.py +++ b/salt/auth/ldap.py @@ -341,14 +341,14 @@ def groups(username, **kwargs): if 'cn' in entry: group_list.append(entry['cn'][0]) log.debug('User {0} is a member of groups: {1}'.format(username, group_list)) - - if _config('freeipa'): + + elif _config('freeipa'): escaped_username = ldap.filter.escape_filter_chars(username) search_base = _config('group_basedn') search_string = _render_template(_config('group_filter'), escaped_username) - search_results = bind.search_s(search_base, - ldap.SCOPE_SUBTREE, - search_string, + search_results = bind.search_s(search_base, + ldap.SCOPE_SUBTREE, + search_string, [_config('accountattributename'), 'cn']) for entry, result in search_results: