mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
ipaldap: Convert dict items to list before iterating
In Python 3, dict.items() returns a view. When such a view is iterated over, the dict cannot change size. Part of the work for: https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
25560f0e1d
commit
c192c1ae3e
@ -456,7 +456,7 @@ class LDAPEntry(collections.MutableMapping):
|
||||
def __delitem__(self, name):
|
||||
name = self._get_attr_name(name)
|
||||
|
||||
for (altname, keyname) in self._names.items():
|
||||
for (altname, keyname) in list(self._names.items()):
|
||||
if keyname == name:
|
||||
del self._names[altname]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user