replace .has_key() by in, .has_key() is deprecated

This commit is contained in:
Hardirc
2015-12-02 14:04:51 -05:00
parent c8db6d5fb7
commit d36d4d77f7
+1 -1
View File
@@ -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()