replace .has_key() by in, .has_key() is deprecated
This commit is contained in:
@@ -664,7 +664,7 @@ def ldap_auth(server='ldap',
|
||||
ldap_groups_of_the_user = list()
|
||||
for group_row in group_search_result:
|
||||
group = group_row[1]
|
||||
if type(group) == dict and group.has_key(group_name_attrib):
|
||||
if type(group) == dict and group_name_attrib in group:
|
||||
ldap_groups_of_the_user.extend(group[group_name_attrib])
|
||||
|
||||
con.unbind()
|
||||
|
||||
Reference in New Issue
Block a user