replace .has_key() by in, .has_key() is deprecated
This commit is contained in:
1 parent
c8db6d5fb7
commit
d36d4d77f7
1 file changed
+1
-1
@@ -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